WD Google Maps – Google Maps builder Plugin - Version 1.0.59

Version Description

  • Fixed: Security issues
Download this release

Release Info

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

Code changes from version 1.0.58 to 1.0.59

admin/controllers/GMWDControllerMaps_gmwd.php CHANGED
@@ -36,32 +36,7 @@ class GMWDControllerMaps_gmwd extends GMWDController{
36
  }
37
  parent::remove($table_name);
38
  }
39
-
40
 
41
- public function download_markers(){
42
- update_option('gmwd_download_markers',1);
43
- $marker_categories = array("clothtexture", "coloring", "modern", "papertexture", "retro", "standart", "woodtexture");
44
- foreach($marker_categories as $marker_category){
45
- if($marker_category == "standart"){
46
- $count = 52;
47
- }
48
- else{
49
- $count = 13;
50
- }
51
- for($i=1; $i<=$count; $i++){
52
- $file256_name = $marker_category."/".$marker_category."_".$i.".png";
53
- $file64_name = $marker_category."/".$marker_category."_".$i."_64.png";
54
-
55
- $file256 = file_get_contents("http://devops.web-dorado.info/anna/markers/".$file256_name);
56
- $file64 = file_get_contents("http://devops.web-dorado.info/anna/markers/".$file64_name);
57
-
58
- file_put_contents(GMWD_DIR.'/images/markers/'.$file256_name, $file256);
59
- file_put_contents(GMWD_DIR.'/images/markers/'.$file64_name, $file64);
60
- }
61
-
62
- }
63
- }
64
-
65
  public function map_data(){
66
  $map_model = GMWDHelper::get_model("maps");
67
  $id = (int)$_POST["map"];
@@ -115,8 +90,12 @@ class GMWDControllerMaps_gmwd extends GMWDController{
115
  global $wpdb;
116
  $ids = array();
117
  if(isset($_POST["ids"])){
118
- $ids = $_POST["ids"] ;
119
- }
 
 
 
 
120
  if(empty($ids) === false){
121
  $map_columns = GMWDModel::get_columns("gmwd_maps");
122
  $map_column_types = GMWDModel::column_types("gmwd_maps");
36
  }
37
  parent::remove($table_name);
38
  }
 
39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  public function map_data(){
41
  $map_model = GMWDHelper::get_model("maps");
42
  $id = (int)$_POST["map"];
90
  global $wpdb;
91
  $ids = array();
92
  if(isset($_POST["ids"])){
93
+ if ( is_array($_POST["ids"])) {
94
+ $ids = array_map('intval', $_POST["ids"]);
95
+ } else {
96
+ $ids = sanitize_text_field($_POST["ids"]);
97
+ }
98
+ }
99
  if(empty($ids) === false){
100
  $map_columns = GMWDModel::get_columns("gmwd_maps");
101
  $map_column_types = GMWDModel::column_types("gmwd_maps");
admin/views/GMWDViewMarkers_gmwd.php CHANGED
@@ -214,10 +214,14 @@ class GMWDViewMarkers_gmwd extends GMWDView{
214
  var markerDefaultIcon = "<?php echo gmwd_get_option("marker_default_icon");?>";
215
 
216
  </script>
217
- <script src="<?php echo GMWD_URL . '/js/markers_gmwd.js'; ?>" type="text/javascript"></script>
218
- <script src="<?php echo GMWD_URL . '/js/admin_main.js'; ?>" type="text/javascript"></script>
219
-
220
  <?php
 
 
 
 
 
 
221
  die();
222
  }
223
 
@@ -241,9 +245,11 @@ class GMWDViewMarkers_gmwd extends GMWDView{
241
  <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
242
  <?php } ?>
243
  <link media="all" type="text/css" href="<?php echo GMWD_URL . '/css/admin_main.css'; ?>" rel="stylesheet">
244
- <script src="<?php echo GMWD_URL . '/js/admin_main.js'; ?>" type="text/javascript"></script>
245
- <script src="<?php echo GMWD_URL . '/js/markers_gmwd.js'; ?>" type="text/javascript"></script>
246
- <script src="<?php echo GMWD_URL . '/js/jscolor/jscolor.js'; ?>" type="text/javascript"></script>
 
 
247
  <!-- header -->
248
  <div class="gmwd_opacity_div">
249
  <div class="gmwd_opacity_div_loading"><img src="<?php echo GMWD_URL;?>/images/loading.gif"></div>
214
  var markerDefaultIcon = "<?php echo gmwd_get_option("marker_default_icon");?>";
215
 
216
  </script>
217
+
 
 
218
  <?php
219
+ $version = get_option("gmwd_version");
220
+ wp_register_script('admin_main', GMWD_URL . '/js/admin_main.js', array(), $version);
221
+ wp_register_script('markers_gmwd', GMWD_URL . '/js/markers_gmwd.js', array(), $version);
222
+ wp_print_scripts('markers_gmwd');
223
+ wp_print_scripts('admin_main');
224
+
225
  die();
226
  }
227
 
245
  <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
246
  <?php } ?>
247
  <link media="all" type="text/css" href="<?php echo GMWD_URL . '/css/admin_main.css'; ?>" rel="stylesheet">
248
+ <?php
249
+ wp_enqueue_script('admin_main');
250
+ wp_enqueue_script('markers_gmwd');
251
+ wp_enqueue_script('jscolor');
252
+ ?>
253
  <!-- header -->
254
  <div class="gmwd_opacity_div">
255
  <div class="gmwd_opacity_div_loading"><img src="<?php echo GMWD_URL;?>/images/loading.gif"></div>
admin/views/GMWDViewPolygons_gmwd.php CHANGED
@@ -170,11 +170,15 @@ class GMWDViewPolygons_gmwd extends GMWDView{
170
  var _hiddenName = "<?php echo isset($_GET["hiddenName"]) ? esc_html(stripslashes($_GET["hiddenName"])) : ""; ?>";
171
  var markerDefaultIcon = "<?php echo gmwd_get_option("marker_default_icon");?>";
172
  </script>
173
- <script src="<?php echo GMWD_URL . '/js/polygons_gmwd.js'; ?>" type="text/javascript"></script>
174
- <script src="<?php echo GMWD_URL . '/js/simple-slider.js'; ?>" type="text/javascript"></script>
175
- <script src="<?php echo GMWD_URL . '/js/admin_main.js'; ?>" type="text/javascript"></script>
176
  <?php
 
 
 
177
 
 
 
 
 
178
  die();
179
  }
180
  ////////////////////////////////////////////////////////////////////////////////////////
170
  var _hiddenName = "<?php echo isset($_GET["hiddenName"]) ? esc_html(stripslashes($_GET["hiddenName"])) : ""; ?>";
171
  var markerDefaultIcon = "<?php echo gmwd_get_option("marker_default_icon");?>";
172
  </script>
 
 
 
173
  <?php
174
+ wp_register_script('polygons_gmwd', GMWD_URL . '/js/polygons_gmwd.js');
175
+ wp_register_script('simple-slider', GMWD_URL . '/js/simple-slider.js');
176
+ wp_register_script('admin_main', GMWD_URL . '/js/admin_main.js');
177
 
178
+
179
+ wp_print_scripts('polygons_gmwd');
180
+ wp_print_scripts('simple-slider');
181
+ wp_print_scripts('admin_main');
182
  die();
183
  }
184
  ////////////////////////////////////////////////////////////////////////////////////////
admin/views/GMWDViewPolylines_gmwd.php CHANGED
@@ -138,12 +138,17 @@ class GMWDViewPolylines_gmwd extends GMWDView{
138
  var _hiddenName = "<?php echo isset($_GET["hiddenName"]) ? esc_html(stripslashes($_GET["hiddenName"])) : ""; ?>";
139
  var markerDefaultIcon = "<?php echo gmwd_get_option("marker_default_icon");?>";
140
  </script>
141
- <script src="<?php echo GMWD_URL . '/js/polylines_gmwd.js'; ?>" type="text/javascript"></script>
142
- <script src="<?php echo GMWD_URL . '/js/simple-slider.js'; ?>" type="text/javascript"></script>
143
- <script src="<?php echo GMWD_URL . '/js/admin_main.js'; ?>" type="text/javascript"></script>
144
  <?php
 
 
 
 
 
 
 
145
 
146
- die();
 
147
  }
148
  ////////////////////////////////////////////////////////////////////////////////////////
149
  // Getters & Setters //
138
  var _hiddenName = "<?php echo isset($_GET["hiddenName"]) ? esc_html(stripslashes($_GET["hiddenName"])) : ""; ?>";
139
  var markerDefaultIcon = "<?php echo gmwd_get_option("marker_default_icon");?>";
140
  </script>
 
 
 
141
  <?php
142
+ $version = get_option("gmwd_version");
143
+ wp_register_script('polylines_gmwd', GMWD_URL . '/js/polylines_gmwd.js', array(), $version);
144
+ wp_register_script('simple-slider', GMWD_URL . '/js/simple-slider.js', array(), $version);
145
+ wp_register_script('admin_main', GMWD_URL . '/js/admin_main.js', array(), $version);
146
+ wp_print_scripts('polylines_gmwd');
147
+ wp_print_scripts('simple-slider');
148
+ wp_print_scripts('admin_main');
149
 
150
+
151
+ die();
152
  }
153
  ////////////////////////////////////////////////////////////////////////////////////////
154
  // Getters & Setters //
admin/views/GMWDViewShortcode_gmwd.php CHANGED
@@ -18,7 +18,6 @@ class GMWDViewShortcode_gmwd extends GMWDView{
18
  // Public Methods //
19
  ////////////////////////////////////////////////////////////////////////////////////////
20
  public function display() {
21
-
22
  $shortcodes = $this->model->get_shortcodes();
23
  $max_short_code_id = $this->model->get_shortcode_max_id();
24
 
@@ -38,16 +37,18 @@ class GMWDViewShortcode_gmwd extends GMWDView{
38
  else{
39
  $api_keys = array("AIzaSyAmYQInD-coq0G5wC_D9h7uHjGeHhSSR4o", "AIzaSyBxiaSJPIRfQWID9j4hCrX3t7z-9IOOjis"," AIzaSyDi6aVWxOVptj9WZZYeAgdAA1xpqAR1mnw", "AIzaSyCzvhE5_lt5l0fYYChF1TpRtfFTjXpYkVI","AIzaSyBMWPhZdxcpwpfXBrGPGmz8zMjwJJt83mc");
40
  $map_api_url .= "&key=" . $api_keys[rand(0,4)];
41
- }
 
 
 
 
 
 
42
  ?>
43
 
44
  <!--<script language="javascript" type="text/javascript" src="<?php echo site_url(); ?> /wp-includes/js/tinymce/tiny_mce_popup.js"></script>
45
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
46
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>-->
47
- <script src="<?php echo GMWD_URL . '/js/admin_main.js'; ?>" type="text/javascript"></script>
48
- <script src="<?php echo GMWD_URL . '/js/simple-slider.js'; ?>" type="text/javascript"></script>
49
- <script src="<?php echo $map_api_url; ?>" type="text/javascript"></script>
50
- <script src="<?php echo GMWD_URL . '/js/init_map_admin.js'; ?>" type="text/javascript"></script>
51
 
52
  <?php if (get_bloginfo('version') >= '4.5') { ?>
53
  <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&dir=ltr&load%5B%5D=dashicons,admin-bar,common,forms,admin-menu,dashboard,list-tables,edit,revisions,media,themes,about,nav-menus,widgets,site-icon,&load%5B%5D=l10n,buttons,wp-auth-check,media-views" rel="stylesheet">
18
  // Public Methods //
19
  ////////////////////////////////////////////////////////////////////////////////////////
20
  public function display() {
 
21
  $shortcodes = $this->model->get_shortcodes();
22
  $max_short_code_id = $this->model->get_shortcode_max_id();
23
 
37
  else{
38
  $api_keys = array("AIzaSyAmYQInD-coq0G5wC_D9h7uHjGeHhSSR4o", "AIzaSyBxiaSJPIRfQWID9j4hCrX3t7z-9IOOjis"," AIzaSyDi6aVWxOVptj9WZZYeAgdAA1xpqAR1mnw", "AIzaSyCzvhE5_lt5l0fYYChF1TpRtfFTjXpYkVI","AIzaSyBMWPhZdxcpwpfXBrGPGmz8zMjwJJt83mc");
39
  $map_api_url .= "&key=" . $api_keys[rand(0,4)];
40
+ }
41
+
42
+
43
+ wp_enqueue_script('admin_main');
44
+ wp_enqueue_script('simple-slider');
45
+ wp_enqueue_script('frontend_init_map-js', $map_api_url );
46
+ wp_enqueue_script('gmwd_init_map_admin-js', GMWD_URL . '/js/init_map_admin.js');
47
  ?>
48
 
49
  <!--<script language="javascript" type="text/javascript" src="<?php echo site_url(); ?> /wp-includes/js/tinymce/tiny_mce_popup.js"></script>
50
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
51
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>-->
 
 
 
 
52
 
53
  <?php if (get_bloginfo('version') >= '4.5') { ?>
54
  <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&dir=ltr&load%5B%5D=dashicons,admin-bar,common,forms,admin-menu,dashboard,list-tables,edit,revisions,media,themes,about,nav-menus,widgets,site-icon,&load%5B%5D=l10n,buttons,wp-auth-check,media-views" rel="stylesheet">
framework/GMWDHelper.php CHANGED
@@ -27,10 +27,10 @@ class GMWDHelper {
27
  public static function get($key, $default_value = '') {
28
 
29
  if (isset($_POST[$key])) {
30
- $value = $_POST[$key];
31
  }
32
  elseif (isset($_GET[$key])) {
33
- $value = $_GET[$key];
34
  }
35
  else {
36
  $value = '';
27
  public static function get($key, $default_value = '') {
28
 
29
  if (isset($_POST[$key])) {
30
+ $value = sanitize_text_field($_POST[$key]);
31
  }
32
  elseif (isset($_GET[$key])) {
33
+ $value = sanitize_text_field($_GET[$key]);
34
  }
35
  else {
36
  $value = '';
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.58';
16
  ////////////////////////////////////////////////////////////////////////////////////////
17
  // Constructor & Destructor //
18
  ////////////////////////////////////////////////////////////////////////////////////////
@@ -280,7 +280,7 @@ class GMWDAdmin
280
  public function gmwd_scripts()
281
  {
282
 
283
- wp_enqueue_script('thickbox');
284
  wp_enqueue_script('gmwd_admin_main-js', GMWD_URL . '/js/admin_main.js');
285
  global $wpdb, $wp_scripts;
286
 
12
  // Variables //
13
  ////////////////////////////////////////////////////////////////////////////////////////
14
  protected static $instance = null;
15
+ private static $version = '1.0.59';
16
  ////////////////////////////////////////////////////////////////////////////////////////
17
  // Constructor & Destructor //
18
  ////////////////////////////////////////////////////////////////////////////////////////
280
  public function gmwd_scripts()
281
  {
282
 
283
+ wp_enqueue_script('thickbox');
284
  wp_enqueue_script('gmwd_admin_main-js', GMWD_URL . '/js/admin_main.js');
285
  global $wpdb, $wp_scripts;
286
 
readme.txt CHANGED
@@ -3,7 +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
- Stable tag: 1.0.58
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -139,6 +139,10 @@ Activate 10Web Google Maps by going to Plugins and pressing Activate button.
139
 
140
  == Changelog ==
141
 
 
 
 
 
142
  = 1.0.58 =
143
  * Fixed: Conflict with Elementor.
144
 
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.59
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
139
 
140
  == Changelog ==
141
 
142
+
143
+ = 1.0.59 =
144
+ * Fixed: Security issues
145
+
146
  = 1.0.58 =
147
  * Fixed: Conflict with Elementor.
148
 
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.58
8
  * Author: 10Web
9
  * Author URI: https://10web.io/plugins
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -22,7 +22,6 @@ if (is_admin()) {
22
  add_action('plugins_loaded', array('GMWDAdmin', 'gmwd_get_instance'));
23
 
24
  add_action('wp_ajax_add_marker', array('GMWDAdmin', 'gmwd_ajax'));
25
- add_action('wp_ajax_download_markers', array('GMWDAdmin', 'gmwd_ajax'));
26
  add_action('wp_ajax_select_marker_icon', array('GMWDAdmin', 'gmwd_ajax'));
27
  add_action('wp_ajax_marker_size', array('GMWDAdmin', 'gmwd_ajax'));
28
  add_action('wp_ajax_add_polygon', array('GMWDAdmin', 'gmwd_ajax'));
@@ -30,6 +29,18 @@ if (is_admin()) {
30
  add_action('wp_ajax_add_circle', array('GMWDAdmin', 'gmwd_ajax'));
31
  add_action('wp_ajax_add_rectangle', array('GMWDAdmin', 'gmwd_ajax'));
32
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  }
34
 
35
  require_once('gmwd_class.php');
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.59
8
  * Author: 10Web
9
  * Author URI: https://10web.io/plugins
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
22
  add_action('plugins_loaded', array('GMWDAdmin', 'gmwd_get_instance'));
23
 
24
  add_action('wp_ajax_add_marker', array('GMWDAdmin', 'gmwd_ajax'));
 
25
  add_action('wp_ajax_select_marker_icon', array('GMWDAdmin', 'gmwd_ajax'));
26
  add_action('wp_ajax_marker_size', array('GMWDAdmin', 'gmwd_ajax'));
27
  add_action('wp_ajax_add_polygon', array('GMWDAdmin', 'gmwd_ajax'));
29
  add_action('wp_ajax_add_circle', array('GMWDAdmin', 'gmwd_ajax'));
30
  add_action('wp_ajax_add_rectangle', array('GMWDAdmin', 'gmwd_ajax'));
31
 
32
+ add_action('admin_enqueue_scripts', 'gmwd_register_admin_scripts');
33
+ }
34
+
35
+
36
+ function gmwd_register_admin_scripts() {
37
+ $version = get_option("gmwd_version");
38
+ wp_register_script('polygons_gmwd', GMWD_URL . '/js/polygons_gmwd.js', array(), $version );
39
+ wp_register_script('polylines_gmwd', GMWD_URL . '/js/polylines_gmwd.js', array(), $version );
40
+ wp_register_script('simple-slider', GMWD_URL . '/js/simple-slider.js', array(), $version );
41
+ wp_register_script('admin_main', GMWD_URL . '/js/admin_main.js', array(), $version );
42
+ wp_register_script('markers_gmwd', GMWD_URL . '/js/markers_gmwd.js', array(), $version );
43
+ wp_register_script('jscolor', GMWD_URL . '/js/jscolor/jscolor.js', array(), $version );
44
  }
45
 
46
  require_once('gmwd_class.php');