* @copyright Copyright (C) 2019 wpopal.com. All Rights Reserved. * @license GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html * * @website http://www.wpopal.com * @support http://www.wpopal.com/support/forum.html */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } class Opalestate_Field_Map { /** * Current version number */ const VERSION = '1.0.0'; /** * Initialize the plugin by hooking into CMB2 */ public function __construct() { add_filter( 'cmb2_render_opal_map', array( $this, 'render_map' ), 10, 5 ); add_filter( 'cmb2_sanitize_opal_map', array( $this, 'sanitize_map' ), 10, 4 ); } /** * Render field */ public function render_map( $field, $field_escaped_value, $field_object_id, $field_object_type, $field_type_object ) { $this->setup_admin_scripts(); $address = (isset( $field_escaped_value['address'] ) ? $field_escaped_value['address'] : ''); echo '
' . __( 'You need to register Google API Key, then put the key in plugin setting.', 'opalestate-pro' ) . '
'; echo '