*/ namespace Cbx\Googlemap; // If this file is called directly, abort. if ( ! defined( 'WPINC' ) ) { die; } use Cbx\Googlemap\Helpers\CBXGooglemapHelper; use Cbx\Googlemap\Helpers\CBXGooglemapMetaHelper; final class CBXGoogleMapAdmin { /** * The ID of this plugin. * * @since 1.0.0 * @access private * @var string $plugin_name The ID of this plugin. */ private $plugin_name; /** * The version of this plugin. * * @since 1.0.0 * @access private * @var string $version The current version of this plugin. */ private $version; /** * The ID of this plugin. * * @since 1.1.12 * @access private * @var string $settings The ID of this plugin. */ public $settings; /** * Initialize the class and set its properties. * * * @since 1.0.0 */ public function __construct() { $this->plugin_name = CBXGOOGLEMAP_PLUGIN_NAME; $this->version = CBXGOOGLEMAP_PLUGIN_VERSION; //get instance of setting api $this->settings = new CBXGooglemapSettings(); }//end of construtor /** * Initialize setting */ public function setting_init() { //set the settings $this->settings->set_sections( $this->get_settings_sections() ); $this->settings->set_fields( $this->get_settings_fields() ); //initialize settings $this->settings->admin_init(); }//end setting_init /** * Global Setting Sections * * * @return array */ public function get_settings_sections() { return apply_filters( 'cbxgooglemap_setting_sections', [ [ 'id' => 'cbxgooglemap_general', 'title' => esc_html__( 'Default Config', 'cbxgooglemap' ) ], [ 'id' => 'cbxgooglemap_demo', 'title' => esc_html__( 'Demo & Shortcodes', 'cbxgooglemap' ) ], [ 'id' => 'cbxgooglemap_tools', 'title' => esc_html__( 'Tools', 'cbxgooglemap' ), ] ] ); }//end get_settings_sections /** * Returns all the settings fields * * @return array settings fields */ public function get_settings_fields() { $general_settings = get_option( 'cbxgooglemap_general', [] ); $tools_delete_table_html = '
' . esc_html__( 'Delete Global Config data(options/plugin settings), custom table(s), files/folders, all map custom post type created by this plugin on uninstall. Please note that this process can not be undone and it is recommended to keep full database and files backup before doing this.', 'cbxgooglemap' ) . '
', 'type' => 'radio', 'options' => [ 'yes' => esc_html__( 'Yes', 'cbxgooglemap' ), 'no' => esc_html__( 'No', 'cbxgooglemap' ), ], 'default' => 'no', ], 'reset_data' => [ 'name' => 'reset_data', 'label' => esc_html__( 'Reset all section', 'cbxgooglemap' ), 'desc' => $tools_delete_table_html . '' . esc_html__( 'This will reset all option/section created by this plugin.', 'cbxgooglemap' ) . '' . esc_html__( 'Reset Sections', 'cbxgooglemap' ) . '
', 'type' => 'html', 'default' => 'off' ], ], ]; $settings_fields = []; //final setting array that will be passed to different filters $sections = $this->get_settings_sections(); foreach ( $sections as $section ) { if ( ! isset( $settings_builtin_fields[ $section['id'] ] ) ) { $settings_builtin_fields[ $section['id'] ] = []; } } foreach ( $sections as $section ) { $settings_fields[ $section['id'] ] = apply_filters( 'cbxgooglemap_global_' . $section['id'] . '_fields', $settings_builtin_fields[ $section['id'] ] ); } return apply_filters( 'cbxgooglemap_global_fields', $settings_fields ); }//end get_settings_fields /** * Register Custom Post Type cbxgooglemap * * @since 3.7.0 */ public function create_post_type() { CBXGooglemapHelper::create_googlemap_post_type(); // Check the option we set on activation. if ( get_option( 'cbxgooglemap_flush_rewrite_rules' ) === 'true' ) { flush_rewrite_rules(); delete_option( 'cbxgooglemap_flush_rewrite_rules' ); } }//end create_post_type /** * Show menu page */ public function menu_pages() { //setting page $setting_page_hook = add_submenu_page( 'edit.php?post_type=cbxgooglemap', esc_html__( 'CBX Map: Settings', 'cbxgooglemap' ), esc_html__( 'Settings', 'cbxgooglemap' ), 'manage_options', 'cbxgooglemap_settings', [ $this, 'menu_page_settings' ] ); $doc_page_hook = add_submenu_page( 'edit.php?post_type=cbxgooglemap', esc_html__( 'CBX Map Helps & Updates', 'cbxgooglemap' ), esc_html__( 'Helps & Updates', 'cbxgooglemap' ), 'manage_options', 'cbxgooglemap_support', [ $this, 'menu_page_docs' ] ); }//end menu_pages /** * Show cbxeventz Setting page */ public function menu_page_settings() { //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo cbxgooglemap_get_template_html( 'admin/settings.php', [ 'ref' => $this, 'settings' => $this->settings ] ); }//end menu_page_settings /** * Render the help & support page for this plugin. * * @since 1.0.0 */ public function menu_page_docs() { echo cbxgooglemap_get_template_html( 'admin/support.php' );//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped }//end method menu_page_docs /** * Add metabox for custom post type cbxfeedbackform && cbxfeedbackbtn * * @since 1.0.0 */ public function add_meta_boxes() { add_meta_box( 'cbxgooglemap_metabox', esc_html__( 'Map Parameters', 'cbxgooglemap' ), [ $this, 'parameter_metabox_display' ], 'cbxgooglemap', 'normal', 'high' ); add_meta_box( 'cbxgooglemap_shortcode', esc_html__( 'Shortcode', 'cbxgooglemap' ), [ $this, 'shortcode_metabox_display' ], 'cbxgooglemap', 'side', 'low' ); }//end add_meta_boxes /** * Show Shortcode display metabox * * @param $post */ public function shortcode_metabox_display( $post ) { if ( isset( $post->ID ) && $post->ID > 0 ) { $post_id = $post->ID; $post_type = $post->post_type; echo cbxgooglemap_get_template_html( 'admin/metabox_shortcode.php', [//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 'post_id' => $post_id, 'post_type' => $post_type ] ); } }//end shortcode_metabox_display /** * Render metabox * * @param $post * * since v1.0.0 */ public function parameter_metabox_display( $post ) { global $post; $post_type = $post->post_type; $meta_fields = CBXGooglemapMetaHelper::cbxgooglemap_meta_fields(); $combined_field = '_' . $post_type . '_combined'; //field name for non sortable fields $meta_prefix = '_' . $post_type; //field prefix for sortable fields CBXGooglemapMetaHelper::render_meta_fields( $post, $meta_fields, $combined_field, $meta_prefix, true ); // }//end parameter_metabox_display /** * Save meta box for cbxeventz * * @param $post_id */ public function metabox_save( $post_id, $post, $update ) { $post_type = $post->post_type; // Check if our nonce is set. if ( ! isset( $_POST[ 'cbxmetahelper_' . $post_type . '_meta_box_nonce' ] ) ) { return $post_id; } // Verify that the nonce is valid. if ( ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST[ 'cbxmetahelper_' . $post_type . '_meta_box_nonce' ] ) ), 'cbxmetahelper_' . $post_type . '_meta_box' ) ) { return $post_id; } // If this is an autosave, our form has not been submitted, so we don't want to do anything. if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return $post_id; } // Check the user's permissions. if ( isset( $_POST['post_type'] ) && $post_type == $_POST['post_type'] ) { if ( ! current_user_can( 'edit_post', $post_id ) ) { return $post_id; } } $meta_fields = CBXGooglemapMetaHelper::cbxgooglemap_meta_fields( $post_id ); $combined_field = '_' . $post_type . '_combined'; //field name for non sortable fields $meta_prefix = '_' . $post_type; //field prefix for sortable fields $meta_combined = get_post_meta( $post_id, $combined_field, true ); //meta fields not sortable $meta_combined = ! is_array( $meta_combined ) ? [] : $meta_combined; $combined_arr = []; foreach ( $meta_fields as $section_id => $fields ) { foreach ( $fields as $id => $field ) { $field_type = $field['type']; $sanitize_callback = isset( $field['sanitize_callback'] ) ? $field['sanitize_callback'] : null; if ( isset( $_POST[ $meta_prefix . $id ] ) ) { if ( isset( $_POST[ $meta_prefix . $id ] ) ) { $updated_value = wp_unslash( $_POST[ $meta_prefix . $id ] );//phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized $updated_value = is_array( $updated_value ) ? cbxgooglemap_decode_entities_array( $updated_value ) : html_entity_decode( $updated_value ); $sanitized = false; if ( $sanitize_callback !== null && is_callable( $sanitize_callback ) ) { $sanitized = true; $updated_value = call_user_func( $sanitize_callback, $updated_value ); } elseif ( $field_type == 'text' ) { $sanitized = true; $updated_value = sanitize_text_field( $updated_value ); } elseif ( $field_type == 'textarea' ) { $sanitized = true; $updated_value = sanitize_textarea_field( $updated_value ); } if ( ! $sanitized ) { $updated_value = wp_kses_post( $updated_value );//general sanitization } $updated_value = apply_filters( 'cbxgooglemap_meta_sanitize_admin', $updated_value, $id, $field, $fields ); $is_sortable = isset( $field['sortable'] ) ? $field['sortable'] : false; if ( $is_sortable ) { $ret = update_post_meta( $post_id, $meta_prefix . $id, $updated_value ); //update the combined meta } else { //save as combined meta $meta_combined[ $meta_prefix . $id ] = $updated_value; } } } } } update_post_meta( $post_id, $combined_field, $meta_combined ); //update the combined meta do_action( 'cbxgooglemap_metabox_save', $post_id ); }//end metabox_save /** * Add or adjust col for cbxgooglemap post type * * @param $cbxpoll_columns * * @return array * */ public function cbxgooglemap_add_new_columns( $columns ) { unset( $columns['date'] ); unset( $columns['comments'] ); $columns['lat'] = esc_attr( 'Latitude', 'cbxgooglemap' ); $columns['lng'] = esc_attr( 'Longitude', 'cbxgooglemap' ); $columns['zoom'] = esc_attr( 'Zoom', 'cbxgooglemap' ); //$columns['shortcode'] = esc_attr( 'Shortcode', 'cbxgooglemap' ); return $columns; }//end cbxgooglemap_add_new_columns /** * Add extra cols information for cbxgooglemap post type * * @param $column_name * * * show data to poll table custom column */ public function cbxgooglemap_manage_columns( $column_name ) { global $wpdb, $post; $post_id = intval( $post->ID ); $post_type = $post->post_type; $combined_field = '_cbxgooglemap_combined'; //field name for non sortable fields $meta_prefix = '_cbxgooglemap'; //field prefix for sortable fields $meta_combined = get_post_meta( $post_id, $combined_field, true ); $lat = get_post_meta( $post_id, $meta_prefix . 'lat', true ); $lat = ( $lat !== false ) ? $lat : ''; $lng = get_post_meta( $post_id, $meta_prefix . 'lng', true ); $lng = ( $lng !== false ) ? $lng : ''; $zoom = ( isset( $meta_combined[ $meta_prefix . 'zoom' ] ) && absint( $meta_combined[ $meta_prefix . 'zoom' ] ) > 0 ) ? absint( $meta_combined[ $meta_prefix . 'zoom' ] ) : ''; switch ( $column_name ) { /*case 'shortcode': echo '' . esc_html__( 'Please wait, Importing...', 'cbxgooglemap' ) . '
'; $cbxgooglemap_setting_js_vars = apply_filters( 'cbxgooglemap_setting_js_vars', array_merge( $setting_js_vars, $global_translation ) ); wp_register_script( 'cbxgooglemap-setting', $js_url . 'cbxgooglemap-setting.js', $setting_js_deps, $ver, $in_footer ); wp_localize_script( 'cbxgooglemap-setting', 'cbxgooglemap_setting_js_var', $cbxgooglemap_setting_js_vars ); //core wp_enqueue_script( 'jquery' ); wp_enqueue_media(); //vendors wp_enqueue_script( 'jquery-ui-sortable' ); wp_enqueue_script( 'select2' ); wp_enqueue_script( 'pickr' ); wp_enqueue_script( 'awesome-notifications' ); //custom wp_enqueue_script( 'cbxgooglemap-setting' ); //for demo js (we need this but we will sort out later) if ( ( $map_source == 1 && ! empty( $api_key ) ) || $map_source == 0 ) { if ( $map_source == 1 ) { //phpcs:ignore WordPress.WP.EnqueuedResourceParameters.NotInFooter wp_register_script( 'coregooglemapapi', '//maps.googleapis.com/maps/api/js?key=' . esc_attr( $api_key ) . '&libraries=places&callback=Function.prototype', [], $ver, $in_footer_async ); wp_register_script( 'cbxgooglemap-public', $js_url . 'cbxgooglemap-public.js', [ 'jquery', 'cbxgooglemap-events', 'coregooglemapapi' ], $ver, $in_footer ); wp_enqueue_script( 'coregooglemapapi' ); } else { wp_register_script( 'coregooglemapapi', $vendor_url . 'leaflet/leaflet.js', [], $ver, $in_footer_async ); wp_register_script( 'cbxgooglemap-public', $js_url . 'cbxgooglemap-public.js', [ 'jquery', 'cbxgooglemap-events', 'coregooglemapapi', //'leaflet-control-geocoder' ], $ver, $in_footer ); wp_enqueue_script( 'cbxgooglemap-events' ); wp_enqueue_script( 'coregooglemapapi' ); //wp_enqueue_script( 'leaflet-control-geocoder' ); } wp_enqueue_script( 'cbxgooglemap-public' ); }//end for demo js }//end js for setting page //enqueue js for tax page if ( ( $hook == 'edit-tags.php' || $hook == 'term.php' ) && $post_type == 'cbxgooglemap' && $current_page == '' ) { //tax js dependencies $tax_js_deps = [ //core 'jquery', //vendors //'jquery-validate' ]; $tax_js_deps = apply_filters( 'cbxgooglemap_tax_js_deps', $tax_js_deps ); $new_map_link_html = '' . $plus_svg . '' . esc_html__( 'New Map', 'cbxgooglemap' ) . ''; $global_setting_link_html = '' . esc_html__( 'Global Settings', 'cbxgooglemap' ) . ''; $tax_js_vars = [ 'tax_title_prefix' => esc_html__( 'Map:', 'cbxgooglemap' ), 'tags_title' => esc_html__( 'Map: Tags', 'cbxgooglemap' ), 'category_title' => esc_html__( 'Map: Category', 'cbxgooglemap' ), 'tax_new_setting' => '' . esc_html__( 'Google Map Api Key is invalid!', 'cbxgooglemap' ) . '
'; } else { $id = isset( $attributes['id'] ) ? absint( $attributes['id'] ) : 0; if ( $id > 0 ) { //render map from saved map return '[cbxgooglemap id="' . $id . '"]'; } else { $attr = []; if ( isset( $attributes['lat'] ) ) { $attr['lat'] = sanitize_text_field( wp_unslash( $attributes['lat'] ) ); } if ( isset( $attributes['lng'] ) ) { $attr['lng'] = sanitize_text_field( wp_unslash( $attributes['lng'] ) ); } if ( isset( $attributes['width'] ) ) { $attr['width'] = sanitize_text_field( $attributes['width'] ); } if ( isset( $attributes['height'] ) ) { $attr['height'] = (int) $attributes['height']; } if ( isset( $attributes['zoom'] ) ) { $attr['zoom'] = sanitize_text_field( $attributes['zoom'] ); } $attr['scrollwheel'] = ! empty( $attributes['scrollwheel'] ) ? 1 : 0; $attr['infow_open'] = ! empty( $attributes['infow_open'] ) ? 1 : 0; $attr['showinfo'] = ! empty( $attributes['showinfo'] ) ? 1 : 0; if ( isset( $attributes['heading'] ) ) { $attr['heading'] = sanitize_text_field( wp_unslash( $attributes['heading'] ) ); } if ( isset( $attributes['address'] ) ) { $attr['address'] = sanitize_text_field( wp_unslash( $attributes['address'] ) ); } if ( isset( $attributes['website'] ) ) { $attr['website'] = sanitize_text_field( wp_unslash( $attributes['website'] ) ); } if ( isset( $attributes['maptype'] ) ) { $attr['maptype'] = sanitize_text_field( wp_unslash( $attributes['maptype'] ) ); } if ( isset( $attributes['mapicon'] ) ) { $attr['mapicon'] = esc_url( $attributes['mapicon'] ); } $attr = apply_filters( 'cbxgooglemap_block_shortcode_builder_attr', $attr, $attributes ); $attr_html = ''; foreach ( $attr as $key => $value ) { $attr_html .= ' ' . $key . '="' . $value . '" '; } //return do_shortcode( '[cbxgooglemap ' . $attr_html . ']' ); return '[cbxgooglemap ' . $attr_html . ']'; } }//end if api keys are ok }//end codeboxrflexiblecountdown_block_render /** * Register New Gutenberg block Category if need * * @param $categories * @param $post * * @return mixed */ public function gutenberg_block_categories( $categories, $post ) { $found = false; foreach ( $categories as $category ) { if ( $category['slug'] == 'codeboxr' ) { $found = true; break; } } if ( ! $found ) { return array_merge( $categories, [ [ 'slug' => 'codeboxr', 'title' => esc_html__( 'CBX Blocks', 'cbxgooglemap' ), ], ] ); } return $categories; }//end gutenberg_block_categories /** * Enqueue style for block editor */ public function enqueue_block_editor_assets() { }//end enqueue_block_editor_assets /** * Load setting html * * @return void */ public function settings_reset_load() { //security check check_ajax_referer( 'cbxgooglemap_nonce', 'security' ); $msg = []; $msg['html'] = ''; $msg['message'] = esc_html__( 'CBX Google Map reset setting html loaded successfully', 'cbxgooglemap' ); $msg['success'] = 1; if ( ! current_user_can( 'manage_options' ) ) { $msg['message'] = esc_html__( 'Sorry, you don\'t have enough permission', 'cbxgooglemap' ); $msg['success'] = 0; wp_send_json( $msg ); } $msg['html'] = CBXGooglemapHelper::setting_reset_html_table(); wp_send_json( $msg ); } //end method settings_reset_load /** * Full plugin reset and redirect */ public function plugin_options_reset() { //security check check_ajax_referer( 'cbxgooglemap_nonce', 'security' ); $url = admin_url( 'admin.php?page=cbxgooglemap_settings' ); $msg = []; $msg['message'] = esc_html__( 'CBX Google Map setting options reset successfully', 'cbxgooglemap' ); $msg['success'] = 1; $msg['url'] = $url; if ( ! current_user_can( 'manage_options' ) ) { $msg['message'] = esc_html__( 'Sorry, you don\'t have enough permission', 'cbxgooglemap' ); $msg['success'] = 0; wp_send_json( $msg ); } do_action( 'cbxgooglemap_plugin_reset_before' ); $plugin_resets = wp_unslash( $_POST ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing //delete options $reset_options = isset( $plugin_resets['reset_options'] ) ? $plugin_resets['reset_options'] : []; $option_values = ( is_array( $reset_options ) && sizeof( $reset_options ) > 0 ) ? array_values( $reset_options ) : array_values( CBXGooglemapHelper::getAllOptionNames() ); foreach ( $option_values as $key => $option ) { delete_option( $option ); } do_action( 'cbxgooglemap_plugin_option_delete' ); do_action( 'cbxgooglemap_plugin_reset_after' ); do_action( 'cbxgooglemap_plugin_reset' ); wp_send_json( $msg ); } //end plugin_reset /** * Export plugin global settings * * @return void */ public function settings_export() { if ( isset( $_GET['cbxgooglemap_settings_export'] ) ) { $url = admin_url( 'admin.php?page=cbxgooglemap_settings' ); $msg = []; $msg['message'] = esc_html__( 'Google Map setting exported successfully', 'cbxgooglemap' ); $msg['success'] = 1; $msg['url'] = $url; $passed = true; $nonce = isset( $_GET['security'] ) ? sanitize_text_field( wp_unslash( $_GET['security'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'cbxgooglemap_settings_nonce' ) ) { $passed = false; $msg['success'] = 0; $msg['message'] = esc_html__( 'Security check failed', 'cbxgooglemap' ); } if ( ! current_user_can( 'manage_options' ) ) { $passed = true; $msg['message'] = esc_html__( 'Sorry, you don\'t have enough permission', 'cbxgooglemap' ); $msg['success'] = 0; } if ( ! $passed ) { wp_send_json( $msg ); } // Get Meta box data $sections = CBXGoogleMapAdmin::get_settings_sections(); $data = [ 'cbxgooglemap_settings' => true ]; $single_section = isset( $_REQUEST['section'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['section'] ) ) : ''; foreach ( $sections as $section ) { if ( $single_section != '' && $section['id'] != $single_section ) { continue; } $sections_fields = get_option( $section['id'] ); if ( ! is_array( $sections_fields ) ) { $sections_fields = []; } $data[ $section['id'] ] = $sections_fields; if ( $single_section != '' && $section['id'] == $single_section ) { break; } } // Create JSON $generate_json = wp_json_encode( $data, JSON_PRETTY_PRINT ); // Create filename $filename = 'cbxgooglemap_settings_json'; // Force download .json file with JSON in it header( 'Content-type: application/vnd.ms-excel' ); header( 'Content-Type: application/force-download' ); header( 'Content-Type: application/download' ); header( 'Content-disposition: ' . $filename . '.json' ); header( 'Content-disposition: filename=' . $filename . '.json' ); print $generate_json;//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped exit; }//end if export mode }//end method settings_export /** * Import settings * * @return void */ public function settings_import() { //security check check_ajax_referer( 'cbxgooglemap_nonce', 'security' ); $msg = []; $msg['message'] = esc_html__( 'CBX Google Map Settings imported successfully', 'cbxgooglemap' ); $msg['success'] = 1; if ( ! current_user_can( 'manage_options' ) ) { $msg['message'] = esc_html__( 'Sorry, you don\'t have enough permission', 'cbxgooglemap' ); $msg['success'] = 0; wp_send_json( $msg ); } // Import settings api data $settings_data = isset( $_REQUEST['settings_data'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['settings_data'] ) ) : ''; $settings_data = str_replace( 'data:application/json;base64,', '', $settings_data ); $settings_data = base64_decode( $settings_data ); $settings_data = json_decode( $settings_data, true ); // Redirect to settings page $msg['url'] = admin_url( 'admin.php?page=cbxgooglemap_settings' ); if ( isset( $settings_data['cbxgooglemap_settings'] ) ) { unset( $settings_data['cbxgooglemap_settings'] ); if ( is_array( $settings_data ) ) { foreach ( $settings_data as $key => $value ) { update_option( $key, $value ); } } wp_send_json( $msg ); } $msg['message'] = esc_html__( 'Sorry, wrong format data', 'cbxgooglemap' ); $msg['success'] = 0; wp_send_json( $msg ); }//end method settings_import /** * Reset single section * * @return void */ public function plugin_reset_section() { //security check check_ajax_referer( 'cbxgooglemap_nonce', 'security' ); $url = admin_url( 'admin.php?page=cbxgooglemap_settings' ); $msg = []; $msg['message'] = esc_html__( 'Comfort Google Map setting section reset successfully', 'cbxgooglemap' ); $msg['success'] = 1; $msg['url'] = $url; if ( ! current_user_can( 'manage_options' ) ) { $msg['message'] = esc_html__( 'Sorry, you don\'t have enough permission', 'cbxgooglemap' ); $msg['success'] = 0; wp_send_json( $msg ); } $section = isset( $_POST['section'] ) ? sanitize_text_field( wp_unslash( $_POST['section'] ) ) : ''; if ( $section == '' ) { $msg['message'] = esc_html__( 'Option section setting failed, as no section id is empty', 'cbxgooglemap' ); $msg['success'] = 0; wp_send_json( $msg ); } //before hooks do_action( 'cbxgooglemap_plugin_reset_section_before' ); //delete the section delete_option( $section ); //after hoooks do_action( 'cbxgooglemap_plugin_reset_section_after' ); do_action( 'cbxgooglemap_plugin_reset_section' ); wp_send_json( $msg ); }//end method plugin_reset_section }//end class CBXGoogleMapAdmin