PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
wp-google-maps
/
includes
<?php namespace WPGMZA; if(!defined('ABSPATH')) return; /** * This class represents the map engine selection dialog, which is presented to the user on the map edit page. */ class MapsEngineDialog { /** * Processes AJAX POST when the user makes a selection * @return void */ public static function post(){ global $wpgmza; if(!wp_verify_nonce($_POST['nonce'], 'wpgmza_maps_engine_dialog_set_engine')){ http_response_code(403); exit; } if(!$wpgmza->isUserAllowedToEdit()){ http_response_code(401); exit; } $settings = get_option('WPGMZA_OTHER_SETTINGS'); $settings['wpgmza_maps_engine'] = sanitize_text_field($_POST['engine']); $settings['wpgmza_maps_engine_dialog_done'] = true; update_option('WPGMZA_OTHER_SETTINGS', $settings); wp_send_json(array('success' => 1)); exit; } /** * Echos the dialog HTML * @return void */ public function html(){ $installerParams = array(); if(!empty($_GET['map_id'])){ $installerParams[] = "map_id=" . intval($_GET['map_id']); } if(!empty($installerParams)){ $installerParams = '&' . implode('&', $installerParams); } else { $installerParams = ''; } ob_start(); ?> <div id="wpgmza-maps-engine-dialog" style="display: none;" data-ajax-nonce="<?php echo wp_create_nonce('wpgmza_maps_engine_dialog_set_engine'); ?>" data-installer-link="<?php echo admin_url('admin.php?page=wp-google-maps-menu&action=installer' . $installerParams); ?>" > <h1> <?php _e('Choose a maps engine', 'wp-google-maps'); ?> </h1> <div class="wpgmza-inner"> <div class="wpgmza-border-box__option"> <input type="radio" name="wpgmza_maps_engine" id="wpgmza_maps_engine_open-layers" value="open-layers" /> <label for="wpgmza_maps_engine_open-layers"> <div> <!--<h3> <?php _e('OpenLayers', 'wp-google-maps'); ?> </h3>--> <img class="wpgmza-engine-logo" src="<?php echo plugin_dir_url(__DIR__) . 'images/OpenLayers_logo.svg.png'?>"/> <ul> <li> <?php _e('No API keys required', 'wp-google-maps'); ?> </li> </ul> </div> <!--<p class="wpgmza-centered"> <button class="button button-primary" data-maps-engine="open-layers"> <?php _e('Use OpenLayers', 'wp-google-maps'); ?> </button> </p>--> <p class="wpgmza-mock-radio wpgmza-centered"> <span class="wpgmza-mock-radio-button"></span> <img class="wpgmza-mock-radio-label" src="<?php echo plugin_dir_url(__DIR__); ?>images/openlayers_logo.png" /> </p> </label> </div> <div class="wpgmza-border-box__option"> <input type="radio" name="wpgmza_maps_engine" id="wpgmza_maps_engine_google-maps" value="google-maps" /> <label for="wpgmza_maps_engine_google-maps"> <div> <!--<h3> <?php _e('Google Maps', 'wp-google-maps'); ?> </h3>--> <img class="wpgmza-engine-logo" src="<?php echo plugin_dir_url(__DIR__) . 'images/icons8-google-maps-500.png'?>"/> <!--<ul class="wpgmza-pros"> <li> <?php _e('Full functionality', 'wp-google-maps'); ?> </li> </ul>--> <ul> <li> <?php _e('API Key required', 'wp-google-maps'); ?> </li> </ul> </div> <!--<p class="wpgmza-centered"> <button class="button button-primary" data-maps-engine="google-maps"> <?php _e('Use Google Maps', 'wp-google-maps'); ?> </button> </p>--> <p class="wpgmza-mock-radio wpgmza-centered"> <span class="wpgmza-mock-radio-button"></span> <img class="wpgmza-mock-radio-label" src="<?php echo plugin_dir_url(__DIR__); ?>images/Google_maps_logo.png" /> </p> </label> </div> </div> <p class="wpgmza-centered"> <button class="button button-primary" id="wpgmza-confirm-engine" disabled style="display: none"> <?php _e('Select Engine', 'wp-google-maps'); ?> </button> </p> <!--<footer> <img src="<?php echo plugin_dir_url(__DIR__); ?>images/WP-google-maps-logo-1-B-transparent.png" alt="<?php _e('WP Go Maps', 'wp-google-maps'); ?>" /> <img src="<?php echo plugin_dir_url(__DIR__); ?>images/codecabin.png" alt="by CODECABIN_" /> </footer>--> </div> <?php $html = ob_get_contents(); ob_end_clean(); return $html; } } add_action('wp_ajax_wpgmza_maps_engine_dialog_set_engine', array('WPGMZA\\MapsEngineDialog', 'post'));
[-] class.admin-ui.php
[edit]
[+]
3rd-party-integration
[-] class.latlng.php
[edit]
[-] class.map.php
[edit]
[-] class.admin-notices.php
[edit]
[-] class.dom-query-results.php
[edit]
[-] class.pointlabel.php
[edit]
[-] class.upgrader.php
[edit]
[-] class.map-list-page.php
[edit]
[-] class.integrity-checker.php
[edit]
[-] class.dom-document.php
[edit]
[-] class.crud.php
[edit]
[+]
styling
[-] class.dynamic-translations.php
[edit]
[-] class.strings.php
[edit]
[-] class.library-script-panel.php
[edit]
[+]
open-layers
[-] class.maps-engine-dialog.php
[edit]
[+]
compat
[-] class.plugin.php
[edit]
[-] class.theme-panel.php
[edit]
[-] class.global-settings.php
[edit]
[+]
google-maps
[-] class.query.php
[edit]
[-] class.modal-dialog.php
[edit]
[-] class.script-loader.php
[edit]
[-] class.internal-engine.php
[edit]
[-] class.selector-to-xpath.php
[edit]
[-] class.polygon.php
[edit]
[-] class.rectangle.php
[edit]
[-] class.system-info.php
[edit]
[-] class.shortcodes.php
[edit]
[-] class.gdpr-compliance.php
[edit]
[+]
php8
[-] build.log
[edit]
[+]
tables
[-] class.polyline.php
[edit]
[-] class.settings.php
[edit]
[-] class.store-locator.php
[edit]
[-] class.country-select.php
[edit]
[-] class.settings-page.php
[edit]
[-] class.dom-element.php
[edit]
[+]
..
[-] class.elias-fano.php
[edit]
[-] class.distance.php
[edit]
[-] class.auto-loader.php
[edit]
[-] class.circle.php
[edit]
[-] class.page.php
[edit]
[-] class.component-anchor-control.php
[edit]
[+]
map-edit-page
[-] class.feature.php
[edit]
[-] class.marker.php
[edit]
[-] class.database.php
[edit]
[-] class.marker-filter.php
[edit]
[-] class.google-maps-api-loader.php
[edit]
[-] class.factory.php
[edit]
[+]
legacy
[-] class.installer-page.php
[edit]
[-] class.query-fragment.php
[edit]