admin_options_name = 'arrow-google-maps-admin-options'; $this->default_settings = array( 'title' => 'Untitled Map', 'shortcode' => 'untitled' ); $this->pagename = 'arrow-google-maps'; $this->new_pagename = 'new_arrow-google-maps'; } function get_admin_options() { // delete_option($this->admin_options_name); // $options = array( // array( // "id" => "123", // "title" => "the-title", // "settings" => array( // "key" => "val" // "key" => "val" // "key" => "val" // ) // ), // array( // "id" => "123", // "title" => "the-title", // "settings" => array( // "key" => "val" // "key" => "val" // "key" => "val" // ) // ), // ); $admin_options = array( "instances" => array() ); $loaded_options = get_option($this->admin_options_name); if (!empty($loaded_options)) { foreach ($loaded_options as $key => $option) { $admin_options[$key] = $option; } } // print_r($admin_options); // die(); update_option($this->admin_options_name, $admin_options); return $admin_options; } function init_pages() { add_menu_page( "Google Maps by Arrow Plugins", "Google Maps by Arrow Plugins", "manage_options", $this->pagename, array($this, "print_options_page"), 'dashicons-location-alt', 25 ); } function admin_includes() { wp_enqueue_script('media-upload'); wp_enqueue_script('thickbox'); wp_enqueue_script('jquery'); wp_enqueue_style('thickbox'); wp_enqueue_style('arrow-google-maps-bootstrap-css', plugins_url('/css/bootstrap.css', __FILE__), false, '1.0', false); wp_enqueue_script('arrow-google-maps-bootstrap-js', plugins_url('/js/bootstrap.min.js', __FILE__), false, '1.0', true); wp_enqueue_style('arrow-google-maps-admin-css', plugins_url('/css/admin.css', __FILE__), false, '1.0', false); wp_enqueue_script('arrow-google-maps-admin-js', plugins_url('/js/admin.js', __FILE__), false, '1.0', true); wp_enqueue_script('arrow-google-maps-styles-js', plugins_url('/js/styles.js', __FILE__), false, '1.0', true); wp_enqueue_style('arrow-google-maps-editor-css', plugins_url('/css/arrow-google-maps-editor.css', __FILE__), false, '1.0', false); wp_enqueue_script('arrow-google-maps-editor-js', plugins_url('/js/arrow-google-maps-editor.js', __FILE__), false, '1.0', true); wp_enqueue_style('arrow-google-maps-css', plugins_url('/css/arrow-google-maps.css', __FILE__), false, '1.0', false); wp_enqueue_script('arrow-google-maps-js', plugins_url('/js/arrow-google-maps.js', __FILE__), false, '1.0', true); } function client_includes() { wp_enqueue_style('arrow-google-maps-css', plugins_url('/css/arrow-google-maps.css', __FILE__), false, '1.0', false); wp_enqueue_script('arrow-google-maps-js', plugins_url('/js/arrow-google-maps.js', __FILE__), false, '1.0', true); } function call_plugin() { $options = $this->get_admin_options(); $instances = $options['instances']; ?> get_admin_options(); $instances = $options['instances']; ?>
| Map Title | Shortcode | Edit | Delete |
|---|---|---|---|
| [arrowgooglemaps name=""] |
Click the button below to create a new map.
Only one Map can be created in Free Version, to Create Unlimited number of Maps Please buy Premium Version with same awesome Features.
Changes saved.
Left-Click on the map to add a marker. Right-Click a marker to delete it. Drag a marker to move it around.
Left-Click a marker to attach an info window to it, or Right-Click to remove it.
Full shortcode: [arrowgooglemaps name="shortcode"]