WD Google Maps – Google Maps builder Plugin - Version 1.0.64

Version Description

  • Fixed: Security issue.
Download this release

Release Info

Developer 10web
Plugin Icon 128x128 WD Google Maps – Google Maps builder Plugin
Version 1.0.64
Comparing to
See all releases

Code changes from version 1.0.63 to 1.0.64

admin/controllers/elementorWidget.php CHANGED
@@ -65,7 +65,7 @@ class GMWDElementor extends \Elementor\Widget_Base {
65
  [
66
  'label_block' => TRUE,
67
  'show_label' => FALSE,
68
- 'description' => __('Select the map to display.', 'gmwd') . ' <a target="_balnk" href="' . add_query_arg(array( 'page' => 'maps_' . 'gmwd' ), admin_url('admin.php')) . '">' . __('Edit map', 'gmwd') . '</a>',
69
  'type' => \Elementor\Controls_Manager::SELECT,
70
  'default' => 0,
71
  'options' => $maps,
65
  [
66
  'label_block' => TRUE,
67
  'show_label' => FALSE,
68
+ 'description' => __('Select the map to display.', 'gmwd') . ' <a target="_blank" href="' . add_query_arg(array( 'page' => 'maps_' . 'gmwd' ), admin_url('admin.php')) . '">' . __('Edit map', 'gmwd') . '</a>',
69
  'type' => \Elementor\Controls_Manager::SELECT,
70
  'default' => 0,
71
  'options' => $maps,
admin/views/GMWDViewOptions_gmwd.php CHANGED
@@ -33,9 +33,6 @@ class GMWDViewOptions_gmwd extends GMWDView{
33
  <form method="post" action="" id="adminForm">
34
  <?php wp_nonce_field('nonce_gmwd', 'nonce_gmwd'); ?>
35
  <div class="wd-clear wd-row">
36
- <div class="wd-left">
37
- <a class="wd-btn wd-btn-primary" href="<?php echo admin_url( 'index.php?page=gmwd_setup' );?>" style=" background: #0a7393; border: 1px solid;"><?php _e("Run Install Wizard ","gmwd"); ?></a>
38
- </div>
39
  <div class="wd-right">
40
  <button class="wd-btn wd-btn-primary wd-btn-icon wd-btn-apply" onclick="gmwdFormSubmit('apply');" ><?php _e("Apply","gmwd");?></button>
41
  </div>
33
  <form method="post" action="" id="adminForm">
34
  <?php wp_nonce_field('nonce_gmwd', 'nonce_gmwd'); ?>
35
  <div class="wd-clear wd-row">
 
 
 
36
  <div class="wd-right">
37
  <button class="wd-btn wd-btn-primary wd-btn-icon wd-btn-apply" onclick="gmwdFormSubmit('apply');" ><?php _e("Apply","gmwd");?></button>
38
  </div>
gmwd_admin_class.php CHANGED
@@ -12,7 +12,7 @@ class GMWDAdmin
12
  // Variables //
13
  ////////////////////////////////////////////////////////////////////////////////////////
14
  protected static $instance = null;
15
- private static $version = '1.0.63';
16
  ////////////////////////////////////////////////////////////////////////////////////////
17
  // Constructor & Destructor //
18
  ////////////////////////////////////////////////////////////////////////////////////////
@@ -26,7 +26,6 @@ class GMWDAdmin
26
 
27
  // Add menu
28
  add_action('admin_menu', array($this, 'gmwd_options_panel'), 9);
29
- //add_action('admin_init', array($this,'setup_redirect'));
30
 
31
  //Screen options
32
  add_filter('set-screen-option', array($this, 'gmwd_set_option_maps'), 10, 3);
@@ -177,24 +176,11 @@ class GMWDAdmin
177
  // Private Methods //
178
  ////////////////////////////////////////////////////////////////////////////////////////
179
 
180
- public function setup_redirect()
181
- {
182
- if (get_option('gmwd_do_activation_set_up_redirect')) {
183
- update_option('gmwd_do_activation_set_up_redirect', 0);
184
- //wp_safe_redirect( admin_url( 'index.php?page=gmwd_setup' ) );
185
- if (get_option("gmwd_subscribe_done") == 1) {
186
- return;
187
- }
188
- wp_safe_redirect(admin_url('index.php?page=gmwd_subscribe'));
189
- exit;
190
- }
191
- }
192
-
193
  // Admin menu
194
  public function gmwd_options_panel()
195
  {
196
  $parent_slug = null;
197
- if (get_option("gmwd_subscribe_done") == 1) {
198
  $parent_slug = "maps_gmwd";
199
  $gmwd_page = add_menu_page("Google Maps", "Google Maps", 'manage_options', 'maps_gmwd', array($this, 'gmwd'), GMWD_URL . '/images/icon-map-20.png', 9);
200
  add_action('load-' . $gmwd_page, array($this, 'gmwd_maps_per_page_option'));
@@ -262,9 +248,6 @@ class GMWDAdmin
262
 
263
  require_once(GMWD_DIR . '/admin/controllers/GMWDController' . ucfirst(strtolower($page)) . '.php');
264
  }
265
- if ($page == 'gmwd_setup') {
266
- require_once('google-maps-setup.php');
267
- }
268
  if ($page == 'gmwd_preview') {
269
  require_once('preview.php');
270
  }
12
  // Variables //
13
  ////////////////////////////////////////////////////////////////////////////////////////
14
  protected static $instance = null;
15
+ private static $version = '1.0.64';
16
  ////////////////////////////////////////////////////////////////////////////////////////
17
  // Constructor & Destructor //
18
  ////////////////////////////////////////////////////////////////////////////////////////
26
 
27
  // Add menu
28
  add_action('admin_menu', array($this, 'gmwd_options_panel'), 9);
 
29
 
30
  //Screen options
31
  add_filter('set-screen-option', array($this, 'gmwd_set_option_maps'), 10, 3);
176
  // Private Methods //
177
  ////////////////////////////////////////////////////////////////////////////////////////
178
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  // Admin menu
180
  public function gmwd_options_panel()
181
  {
182
  $parent_slug = null;
183
+ if (1 || get_option("gmwd_subscribe_done") == 1) {
184
  $parent_slug = "maps_gmwd";
185
  $gmwd_page = add_menu_page("Google Maps", "Google Maps", 'manage_options', 'maps_gmwd', array($this, 'gmwd'), GMWD_URL . '/images/icon-map-20.png', 9);
186
  add_action('load-' . $gmwd_page, array($this, 'gmwd_maps_per_page_option'));
248
 
249
  require_once(GMWD_DIR . '/admin/controllers/GMWDController' . ucfirst(strtolower($page)) . '.php');
250
  }
 
 
 
251
  if ($page == 'gmwd_preview') {
252
  require_once('preview.php');
253
  }
google-maps-setup.php DELETED
@@ -1,546 +0,0 @@
1
- <?php
2
- class GMWDSetupWizard {
3
- // //////////////////////////////////////////////////////////////////////////////////////
4
- // Events //
5
- // //////////////////////////////////////////////////////////////////////////////////////
6
- // //////////////////////////////////////////////////////////////////////////////////////
7
- // Constants //
8
- // //////////////////////////////////////////////////////////////////////////////////////
9
- private $steps;
10
- // //////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- // //////////////////////////////////////////////////////////////////////////////////////
13
- // //////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- // //////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- add_action ( 'admin_menu', array (
18
- $this,
19
- 'admin_menu'
20
- ) );
21
- add_action ( 'admin_init', array (
22
- $this,
23
- 'gmwd_setup_wizard'
24
- ) );
25
-
26
- if(isset($_POST["task"]) && $_POST["task"] == "save_api_key"){
27
- $this->save_api_key();
28
- }
29
- }
30
- // //////////////////////////////////////////////////////////////////////////////////////
31
- // Public Methods //
32
- // //////////////////////////////////////////////////////////////////////////////////////
33
- public function admin_menu() {
34
- add_dashboard_page ( '', '', 'manage_options', 'gmwd_setup', '' );
35
- }
36
-
37
- public function gmwd_setup_wizard() {
38
- require_once (GMWD_DIR . '/framework/GMWDHelper.php');
39
- $this->steps = array(
40
- 'general' => array(
41
- 'name' => __('General Options', "gmwd"),
42
- 'slug' => "setup_general",
43
- ),
44
- 'global' => array(
45
- 'name' => __( 'Global Options', "gmwd"),
46
- 'slug' => "setup_default",
47
- ),
48
- 'ready' => array(
49
- 'name' => __('Ready!', "gmwd"),
50
- 'slug' => "setup_ready",
51
- )
52
- );
53
-
54
- if (get_bloginfo('version') >= '4.5') {
55
- $required_styles = array(
56
- 'admin-bar',
57
- 'dashicons',
58
- 'common',
59
- 'forms',
60
- 'admin-menu',
61
- 'dashboard',
62
- 'list-tables',
63
- 'edit',
64
- 'revisions',
65
- 'media',
66
- 'themes',
67
- 'about',
68
- 'nav-menus',
69
- 'widgets',
70
- 'site-icon',
71
- 'wp-admin', // admin styles
72
- 'buttons', // buttons styles
73
- 'media-views', // media uploader styles
74
- 'wp-auth-check', // check all
75
- );
76
- }
77
- else{
78
- $required_styles = array(
79
- 'admin-bar',
80
- 'dashicons',
81
- 'wp-admin', // admin styles
82
- 'buttons', // buttons styles
83
- 'media-views', // media uploader styles
84
- 'wp-auth-check', // check all
85
- );
86
- }
87
-
88
-
89
- wp_enqueue_style ( 'admin_main-css', GMWD_URL . '/css/admin_main.css', $required_styles, '' );
90
- wp_enqueue_style ( 'simple_slider-css', GMWD_URL . '/css/simple-slider.css', array (), '' );
91
-
92
- wp_register_script ( 'jquery', FALSE, array ('jquery-core','jquery-migrate'), '1.10.2' );
93
- wp_enqueue_script ( 'jquery' );
94
- $map_api_url = "https://maps.googleapis.com/maps/api/js?libraries=places&sensor=false&v=3.exp";
95
-
96
- if(gmwd_get_option("map_language")){
97
- $map_api_url .= "&language=" . gmwd_get_option("map_language");
98
- }
99
- if(gmwd_get_option("map_api_key")){
100
- $map_api_url .= "&key=" . gmwd_get_option("map_api_key");
101
- }
102
- else{
103
- $api_keys = array("AIzaSyAmYQInD-coq0G5wC_D9h7uHjGeHhSSR4o", "AIzaSyBxiaSJPIRfQWID9j4hCrX3t7z-9IOOjis"," AIzaSyDi6aVWxOVptj9WZZYeAgdAA1xpqAR1mnw", "AIzaSyCzvhE5_lt5l0fYYChF1TpRtfFTjXpYkVI","AIzaSyBMWPhZdxcpwpfXBrGPGmz8zMjwJJt83mc");
104
- $map_api_url .= "&key=" . $api_keys[rand(0,4)];
105
- }
106
- wp_register_script ('google_map-js', $map_api_url, array ('jquery'), '' );
107
- wp_enqueue_script('google_map-js');
108
-
109
- wp_register_script ('admin_main-js', GMWD_URL . '/js/admin_main.js', array ('jquery'), '' );
110
- wp_enqueue_script ('admin_main-js');
111
-
112
- wp_register_script ('admin_main_map-js', GMWD_URL . '/js/main_map.js', array ('jquery'), '' );
113
- wp_enqueue_script ('admin_main_map-js');
114
-
115
- wp_register_script ('options-js', GMWD_URL . '/js/options_gmwd.js', array ('jquery'), '' );
116
- wp_enqueue_script ('options-js');
117
-
118
- wp_register_script ('simple_slider-js', GMWD_URL . '/js/simple-slider.js', array ('jquery'), '' );
119
- wp_enqueue_script ('simple_slider-js' );
120
-
121
- wp_enqueue_script ('thickbox');
122
- wp_enqueue_script('jquery-ui-tooltip');
123
-
124
- ob_start ();
125
- $this->gmwd_setup_wizard_header ();
126
- $this->gmwd_setup_wizard_content ();
127
- $this->gmwd_setup_wizard_footer ();
128
- exit ();
129
- }
130
-
131
- // //////////////////////////////////////////////////////////////////////////////////////
132
- // Getters & Setters //
133
- // //////////////////////////////////////////////////////////////////////////////////////
134
- // //////////////////////////////////////////////////////////////////////////////////////
135
- // Private Methods //
136
- // //////////////////////////////////////////////////////////////////////////////////////
137
- // //////////////////////////////////////////////////////////////////////////////////////
138
- // Listeners //
139
- // //////////////////////////////////////////////////////////////////////////////////////
140
- private function gmwd_setup_wizard_header() {
141
- ?>
142
- <!DOCTYPE html>
143
- <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
144
- <head>
145
- <meta name="viewport" content="width=device-width" />
146
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
147
- <title><?php _e( 'Google Maps &rsaquo; Setup Wizard', 'gmwd' ); ?></title>
148
-
149
- <?php do_action( 'admin_print_styles' ); ?>
150
- <?php do_action( 'admin_head' ); ?>
151
- <?php wp_print_scripts( 'jquery' ); ?>
152
- <?php wp_print_scripts( 'jquery-ui-tooltip' ); ?>
153
- <?php wp_print_scripts( 'thickbox' ); ?>
154
- <?php wp_print_scripts( 'admin_main-js' ); ?>
155
- <?php wp_print_scripts( 'google_map-js' ); ?>
156
- <?php wp_print_scripts( 'admin_main_map-js' ); ?>
157
- <?php wp_print_scripts( 'simple_slider-js' ); ?>
158
- <?php wp_print_scripts( 'options-js' ); ?>
159
- <script>
160
- var mapWhellScrolling = Number(<?php echo gmwd_get_option("whell_scrolling");?>) == 1 ? true : false;
161
- var zoom = Number(<?php echo gmwd_get_option("zoom_level");?>);
162
- var mapDragable = Number(<?php echo gmwd_get_option("map_draggable");?>) == 1 ? true : false;
163
- var centerLat = Number(<?php echo gmwd_get_option("center_lat");?>);
164
- var centerLng = Number(<?php echo gmwd_get_option("center_lng");?>);
165
- var centerAddress = '<?php echo gmwd_get_option("center_address");?>';
166
- var map;
167
- </script>
168
-
169
- </head>
170
- <body style="background: #eee;">
171
- <h1 class="gmwd_wizard_title">
172
- <img src="<?php echo GMWD_URL."/images/icon-map-50.png";?>">
173
- Google Maps
174
- </h1>
175
- <?php
176
- }
177
- private function gmwd_setup_wizard_content() {
178
- $step = GMWDHelper::get("step");
179
- switch ($step) {
180
- case "" :
181
- $this->gmwd_setup();
182
- break;
183
- case "setup_general" :
184
- $this->gmwd_setup_general();
185
- break;
186
- case "setup_default" :
187
- $this->gmwd_setup_default();
188
- break;
189
- case "setup_ready" :
190
- $this->gmwd_setup_ready();
191
- break;
192
- }
193
- ?>
194
- <?php
195
-
196
- }
197
-
198
-
199
- private function gmwd_setup_wizard_footer() {
200
- ?>
201
- </body>
202
- </html>
203
- <?php
204
- }
205
-
206
-
207
- private function gmwd_setup() {
208
- ?>
209
- <div class="gmwd_edit gmwd_wizard">
210
- <form method="post" action="">
211
- <div class="gmwd_wizard_containers">
212
- <?php $this->gmwd_steps();?>
213
- <div class="gmwd_wizard_container gmwd_wizard_geting_start">
214
- <h2>We welcome you in Google Maps plugin!</h2>
215
- <div>
216
- <p>
217
- We appreciate your confidence in choosing Google Maps!
218
- </p>
219
-
220
- <p>
221
- <?php _e("We will do the utmost to provide you with the best service possible. In this quick wizard we are going to help with the basic configurations of the plugin. You may skip it or follow our simple instruction, which will take couple of moments. ","gmwd");?>
222
- </p>
223
- <p>
224
- <?php _e("Click the \"Let's start\" button to jump into the wizard or skip it to go back to the WordPress dashboard. You will be able to come back anytime in the future! ","gmwd");?>
225
- </p>
226
- </div>
227
- <div class="gmwd_wizard_btns">
228
- <a class="wd-btn wd-btn-primary" id="gmwd_wizard_allow"
229
- href="index.php?page=gmwd_setup&step=setup_general"><?php _e("Let's Start!","gmwd");?></a>
230
- <a class="wd-btn wd-btn-secondary" id="gmwd_wizard_cancel"
231
- href="admin.php?page=maps_gmwd"><?php _e("Skip for Now","gmwd");?></a>
232
- </div>
233
- </div>
234
- </div>
235
- </form>
236
- </div>
237
-
238
- <?php
239
- }
240
- private function gmwd_setup_general() {
241
- $map_languages_list = array (
242
- "" => "Location Base",
243
- "ar" => "Arabic",
244
- "bg" => "Bulgarian",
245
- "bn" => "Bengali",
246
- "ca" => "Catalan",
247
- "cs" => "Czech",
248
- "da" => "Danish",
249
- "de" => "German",
250
- "el" => "Greek",
251
- "en" => "English",
252
- "en-AU" => "English (Australian)",
253
- "en-GB" => "English (Great Britain)",
254
- "es" => "Spanish",
255
- "eu" => "Basque",
256
- "fa" => "Farsi",
257
- "fi" => "Finnish",
258
- "fil" => "Filipino",
259
- "fr" => "French",
260
- "gl" => "Galician",
261
- "gu" => "Gujarati",
262
- "hi" => "Hindi",
263
- "hr" => "Croatian",
264
- "hu" => "Hungarian",
265
- "id" => "Indonesian",
266
- "it" => "Italian",
267
- "iw" => "Hebrew",
268
- "ja" => "Japanese",
269
- "kn" => "Kannada",
270
- "ko" => "Korean",
271
- "lt" => "Lithuanian",
272
- "lv" => "Latvian",
273
- "ml" => "Malayalam",
274
- "mr" => "Marathi",
275
- "nl" => "Dutch",
276
- "no" => "Norwegian",
277
- "pl" => "Polish",
278
- "pt" => "Portuguese",
279
- "pt-BR" => "Portuguese (Brazil)",
280
- "pt-PT" => "Portuguese (Portugal)",
281
- "ro" => "Romanian",
282
- "ru" => "Russian",
283
- "sk" => "Slovak",
284
- "sl" => "Slovenian",
285
- "sr" => "Serbian",
286
- "sv" => "Swedish",
287
- "ta" => "Tamil",
288
- "te" => "Telugu",
289
- "th" => "Thai",
290
- "tl" => "Tagalog",
291
- "tr" => "Turkish",
292
- "uk" => "Ukrainian",
293
- "vi" => "Vietnamese",
294
- "zh-CN" => "Chinese (Simplified)",
295
- "zh-TW" => "Chinese (Traditional)"
296
- );
297
- $query_url_generate_key = 'https://console.developers.google.com/henhouse/?pb=["hh-1","maps_backend",null,[],"https://developers.google.com",null,["maps_backend","geocoding_backend","directions_backend","distance_matrix_backend","elevation_backend","places_backend","static_maps_backend","roads","street_view_image_backend","geolocation"],null]';
298
- ?>
299
- <div class="gmwd_edit gmwd_wizard">
300
- <form method="post" action="" id="setupForm">
301
- <div class="gmwd_wizard_containers">
302
- <?php $this->gmwd_steps();?>
303
- <div class="gmwd_wizard_container gmwd_wizard_general_container">
304
- <h2><?php _e("General Options","gmwd");?></h2>
305
- <table class="gmwd_edit_table" style="width: 100%;">
306
- <tr>
307
- <td colspan="2">
308
- <p style="font-size:17px;"><strong><?php _e("Important. API key is required for Google Maps to work.","gmwd"); ?></strong></p>
309
- <a target="_blank" class="wd-btn wd-btn-primary" name="<?php _e( 'Generate API Key - ( MUST be logged in to your Google account )', 'gmwd' ); ?>" href='<?php echo $query_url_generate_key;?>'>
310
- <?php _e("Generate Key","gmwd");?>
311
- </a>
312
- or <a target="_blank" href='https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend,static_maps_backend,roads,street_view_image_backend,geolocation,places_backend&keyType=CLIENT_SIDE&reusekey=true'>click here</a>
313
- <?php echo _e( ' to Get a Google Maps API KEY', 'gmwd' ) ?>
314
- </td>
315
- </tr>
316
- <tr>
317
- <td width="30%"><label for="map_api_key" title="<?php _e("Set your map API key","gmwd");?>"><?php _e("Map API Key","gmwd"); ?>:</label></td>
318
- <td>
319
- <input type="text" name="map_api_key" id="map_api_key" value="" ><br>
320
- <small><?php _e("Once saved, it may take up to 5 minutes for your map to display.","gmwd"); ?></small>
321
- </td>
322
- </tr>
323
-
324
- <tr>
325
- <td><label for="map_language" title="<?php _e("Choose Your Map Language","gmwd");?>"><?php _e("Map Language","gmwd"); ?>:</label></td>
326
- <td>
327
- <select name="map_language" id="map_language">
328
- <?php
329
- foreach ( $map_languages_list as $key => $value ) {
330
- echo '<option value="' . $key . '" >' . $value . '</option>';
331
- }
332
-
333
- ?>
334
- </select>
335
- </td>
336
- </tr>
337
- </table>
338
- <div class="gmwd_wizard_btns">
339
- <button class="wd-btn wd-btn-primary"
340
- id="gmwd_wizard_countinue_general"><?php _e("Continue","gmwd");?></button>
341
- <a class="wd-btn wd-btn-secondary" id="gmwd_wizard_skip_general"
342
- href="index.php?page=gmwd_setup&step=setup_default"><?php _e("Skip this step","gmwd");?></a>
343
- </div>
344
- </div>
345
- </div>
346
- </form>
347
- </div>
348
- <script>
349
- jQuery( document ).ready(function() {
350
- jQuery("#gmwd_wizard_countinue_general").click(function(){
351
- jQuery("#setupForm").attr("action", "index.php?page=gmwd_setup&step=setup_default");
352
- jQuery("#setupForm").submit();
353
- });
354
- });
355
-
356
- </script>
357
- <?php
358
- }
359
- private function gmwd_setup_default() {
360
- $this->gmwd_setup_apply();
361
- ?>
362
- <div class="gmwd_edit gmwd_wizard">
363
- <?php if(!gmwd_get_option("map_api_key")){
364
- api_key_notice();
365
- }
366
- ?>
367
- <form method="post" action="" id="setupForm">
368
- <div class="gmwd_wizard_containers">
369
- <?php $this->gmwd_steps();?>
370
- <div class="gmwd_wizard_container gmwd_wizard_default_container">
371
- <h2><?php _e("Default Options","gmwd");?></h2>
372
- <div class="wd-clear">
373
- <div class="wd-left" style="width:412px;">
374
- <table class="gmwd_edit_table" style="width: 100%;">
375
- <tr>
376
- <td style="width: 20%;"><label for="address" title="<?php _e("Set Center Address of your Google Map","gmwd");?>"><?php _e("Center address","gmwd");?>:</label></td>
377
- <td>
378
- <input type="text" name="center_address" id="address"
379
- value="" autocomplete="off"><br>
380
- <small><em><?php _e("Or Right Click on the Map.","gmwd");?></em></small>
381
- </td>
382
- </tr>
383
- <tr>
384
- <td><label for="center_lat" title="<?php _e("Google Map's Center Latitude","gmwd");?>"><?php _e("Center Lat","gmwd");?>:</label></td>
385
- <td><input type="text" name="center_lat" id="center_lat"
386
- value=""></td>
387
- </tr>
388
- <tr>
389
- <td><label for="center_lng" title="<?php _e("Google Map's Center Longitude","gmwd");?>"><?php _e("Center Lng","gmwd");?>:</label></td>
390
- <td><input type="text" name="center_lng" id="center_lng"
391
- value=""></td>
392
- </tr>
393
- <tr>
394
- <td><label for="zoom_level" title="<?php _e("Choose the Zoom Level of Your Google Maps","gmwd");?>"><?php _e("Zoom Level","gmwd");?>:</label></td>
395
- <td><input type="text" name="zoom_level" id="zoom_level"
396
- value="<?php echo gmwd_get_option("zoom_level");?>" data-slider="true"
397
- data-slider-highlight="true" data-slider-theme="volume"
398
- data-slider-values="<?php echo implode(",",range(0,22)); ?>"></td>
399
- </tr>
400
- <tr>
401
- <td><label title="<?php _e("Enable or Disable Mouse Scroll-Wheel Scaling","gmwd");?>"><?php _e("Wheel Scrolling","gmwd"); ?>:</label></td>
402
- <td><input type="radio" class="inputbox" id="whell_scrolling0"
403
- name="whell_scrolling"
404
- <?php echo ((gmwd_get_option("whell_scrolling")) ? '' : 'checked="checked"'); ?>
405
- value="0"> <label for="whell_scrolling0"><?php _e("Off","gmwd"); ?></label>
406
- <input type="radio" class="inputbox" id="whell_scrolling1"
407
- name="whell_scrolling"
408
- <?php echo ((gmwd_get_option("whell_scrolling")) ? 'checked="checked"' : ''); ?>
409
- value="1"> <label for="whell_scrolling1"><?php _e("On","gmwd"); ?></label>
410
- </td>
411
- </tr>
412
- <tr>
413
- <td><label title="<?php _e("Enable or Disable Google Maps Dragging","gmwd");?>"><?php _e("Map Draggable","gmwd"); ?>:</label></td>
414
- <td><input type="radio" class="inputbox" id="map_draggable0"
415
- name="map_draggable"
416
- <?php echo ((gmwd_get_option("map_draggable")) ? '' : 'checked="checked"'); ?>
417
- value="0"> <label for="map_draggable0"><?php _e("No","gmwd"); ?></label>
418
- <input type="radio" class="inputbox" id="map_draggable1"
419
- name="map_draggable"
420
- <?php echo ((gmwd_get_option("map_draggable")) ? 'checked="checked"' : ''); ?>
421
- value="1"> <label for="map_draggable1"><?php _e("Yes","gmwd"); ?></label>
422
- </td>
423
- </tr>
424
- </table>
425
- </div>
426
-
427
- <div class="wd-right">
428
- <div id="wd-options-map" class="wd-set-up-map" style="width:360px; height:300px;"></div>
429
- </div>
430
- </div>
431
- <div class="gmwd_wizard_btns">
432
- <a class="wd-btn wd-btn-secondary" id="gmwd_wizard_skip_general"
433
- href="index.php?page=gmwd_setup&step=setup_general"><?php _e("Back","gmwd");?></a>
434
- <button class="wd-btn wd-btn-primary"
435
- id="gmwd_wizard_countinue_default"><?php _e("Continue","gmwd");?></button>
436
- <a class="wd-btn wd-btn-secondary" id="gmwd_wizard_skip_default"
437
- href="index.php?page=gmwd_setup&step=setup_ready"><?php _e("Skip this step","gmwd");?></a>
438
- </div>
439
- </div>
440
- </div>
441
- </form>
442
- </div>
443
- <script>
444
- jQuery(".gmwd_edit_table [data-slider]").each(function () {
445
- var input = jQuery(this);
446
- jQuery("<span>").addClass("output").insertAfter(jQuery(this));
447
- }).bind("slider:ready slider:changed", function (event, data) {
448
- jQuery(this) .nextAll(".output:first").html(data.value.toFixed(1));
449
- });
450
- gmwdSlider(this.jQuery || this.Zepto, jQuery(".gmwd_edit_table"));
451
-
452
- jQuery( document ).ready(function() {
453
- jQuery(document).tooltip();
454
- jQuery("#gmwd_wizard_countinue_default").click(function(){
455
- jQuery("#setupForm").attr("action", "index.php?page=gmwd_setup&step=setup_ready");
456
- jQuery("#setupForm").submit();
457
- });
458
- });
459
-
460
- </script>
461
-
462
- <?php
463
- }
464
- private function gmwd_setup_ready() {
465
- $this->gmwd_setup_apply ();
466
- ?>
467
- <div class="gmwd_edit gmwd_wizard">
468
- <?php if(!gmwd_get_option("map_api_key")){
469
- api_key_notice();
470
- }
471
- ?>
472
- <form method="post">
473
- <div class="gmwd_wizard_containers">
474
- <?php $this->gmwd_steps();?>
475
- <div class="gmwd_wizard_container gmwd_wizard_ready_container">
476
- <h2><?php _e("All Set!","gmwd");?></h2>
477
- <div class="gmwd_wizard_ready_text">
478
- <p>
479
- <?php
480
- _e ( "Now you are ready to create your first Google Map!
481
- Click the blue button below and start building your awesome map!", "gmwd" );
482
- ?>
483
- </p>
484
- </div>
485
-
486
- <div class="gmwd_wizard_table">
487
- <p>
488
- <a href="admin.php?page=maps_gmwd"
489
- class="gmwd_wizard_create_your_maps"><?php _e("Create Your First Map!","gmwd");?></a>
490
- </p>
491
- </div>
492
- </div>
493
- </div>
494
- </form>
495
- </div>
496
- <?php
497
- }
498
- private function gmwd_setup_apply() {
499
- global $wpdb;
500
- $query = "SELECT name FROM " . $wpdb->prefix . "gmwd_options";
501
- // get option names
502
- $names = $wpdb->get_col ( $query, 0 );
503
-
504
- // update options
505
-
506
- for($i = 0; $i < count ( $names ); $i ++) {
507
- $name = $names [$i];
508
- $value = isset($_POST[$name]) ? sanitize_text_field($_POST[$name]) : null;
509
-
510
- if ($value !== null) {
511
- $data = array ();
512
- $data ["value"] = $value;
513
- $where = array ("name" => $name );
514
-
515
- $where_format = $format = array ('%s');
516
-
517
- $wpdb->update ( $wpdb->prefix . "gmwd_options", $data, $where, $format, $where_format );
518
- }
519
- }
520
- }
521
- private function save_api_key(){
522
- global $wpdb;
523
- $data = array();
524
- $data["value"] = esc_html(GMWDHelper::get("gmwd_api_key_general"));
525
- $where = array("name"=>"map_api_key");
526
- $where_format = $format = array('%s');
527
- $wpdb->update( $wpdb->prefix . "gmwd_options", $data, $where, $format, $where_format );
528
- GMWDHelper::gmwd_redirect("admin.php?page=".GMWDHelper::get("page").'&step='.GMWDHelper::get("step"));
529
-
530
- }
531
- private function gmwd_steps(){
532
- ?>
533
- <ul class="gmwd_wizard_tabs wd-clear">
534
- <?php
535
- foreach($this->steps as $step){
536
- $class = $step["slug"] == GMWDHelper::get("step") ? "gmwd_wizard_active" : "gmwd_wizard_tab_notdone";
537
- echo ' <li class="gmwd_wizard_general '.$class.'"><span>'. $step["name"].'</span></li>';
538
- }
539
- ?>
540
- </ul>
541
- <?php
542
- }
543
- }
544
- new GMWDSetupWizard ();
545
-
546
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -3,8 +3,7 @@ Contributors: webdorado,10web,wdsupport
3
  Tags: google map, google maps, map, map markers, maps, directions, google map plugin, google maps plugin, map plugin, wp google map, wp google maps, google map widget
4
  Requires at least: 3.4
5
  Tested up to: 5.2
6
- Requires PHP: 5.2
7
- Stable tag: 1.0.63
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -140,8 +139,11 @@ Activate 10Web Google Maps by going to Plugins and pressing Activate button.
140
 
141
  == Changelog ==
142
 
 
 
 
143
  = 1.0.63 =
144
- * Added: Ask a question button.
145
 
146
  = 1.0.62 =
147
  * Fixed: a minor bug
3
  Tags: google map, google maps, map, map markers, maps, directions, google map plugin, google maps plugin, map plugin, wp google map, wp google maps, google map widget
4
  Requires at least: 3.4
5
  Tested up to: 5.2
6
+ Stable tag: 1.0.64
 
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
139
 
140
  == Changelog ==
141
 
142
+ = 1.0.64 =
143
+ * Fixed: Security issue.
144
+
145
  = 1.0.63 =
146
+ * Added: Ask a question button.
147
 
148
  = 1.0.62 =
149
  * Fixed: a minor bug
wd-google-maps.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: 10Web Google Maps
5
  * Plugin URI: https://10web.io/plugins/wordpress-google-maps/
6
  * Description: 10Web Google Maps is an intuitive tool for creating Google maps with advanced markers, custom layers and overlays for your website.
7
- * Version: 1.0.63
8
  * Author: 10Web
9
  * Author URI: https://10web.io/plugins
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -333,7 +333,7 @@ function wd_gmwd_init()
333
  "plugin_menu_title" => "Google Maps",
334
  "plugin_menu_icon" => GMWD_URL . '/images/icon-map-20.png',
335
  "deactivate" => true,
336
- "subscribe" => true,
337
  "custom_post" => "maps_gmwd", // if true => edit.php?post_type=contact
338
  "menu_capability" => "manage_options",
339
  "menu_position" => null,
4
  * Plugin Name: 10Web Google Maps
5
  * Plugin URI: https://10web.io/plugins/wordpress-google-maps/
6
  * Description: 10Web Google Maps is an intuitive tool for creating Google maps with advanced markers, custom layers and overlays for your website.
7
+ * Version: 1.0.64
8
  * Author: 10Web
9
  * Author URI: https://10web.io/plugins
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
333
  "plugin_menu_title" => "Google Maps",
334
  "plugin_menu_icon" => GMWD_URL . '/images/icon-map-20.png',
335
  "deactivate" => true,
336
+ "subscribe" => false,
337
  "custom_post" => "maps_gmwd", // if true => edit.php?post_type=contact
338
  "menu_capability" => "manage_options",
339
  "menu_position" => null,