WD Google Maps – Google Maps builder Plugin - Version 1.0.69

Version Description

  • Fixed: Vulnerabilities.
Download this release

Release Info

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

Code changes from version 1.0.68 to 1.0.69

admin/views/GMWDViewMaps_gmwd.php CHANGED
@@ -128,11 +128,11 @@ class GMWDViewMaps_gmwd extends GMWDView{
128
  <?php echo $row->title;?>
129
  </a>
130
  </td>
131
- <td class="shortcode column-shortcode">
132
- <input type="text" style="border: 1px solid #eee; padding: 1px 4px;background: rgba(208, 203, 203, 0.1);width: 240px;" value="<?php echo '[Google_Maps_WD id='.$row->shortcode_id.' map='.$row->id.']';?>" readonly onclick="jQuery(this).focus();jQuery(this).select();">
133
  </td>
134
- <td class="php_function column-php_function">
135
- <input type="text" style="border: 1px solid #eee; padding: 1px 4px;background: rgba(208, 203, 203, 0.1);" value="&#60;?php gmwd_map( <?php echo $row->shortcode_id; ?>, <?php echo $row->id; ?>); ?&#62;" readonly onclick="jQuery(this).focus();jQuery(this).select();">
136
  </td>
137
 
138
  <td class="table_big_col" align="center">
@@ -156,7 +156,7 @@ class GMWDViewMaps_gmwd extends GMWDView{
156
  <input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
157
  <input id="current_id" name="current_id" type="hidden" value="" />
158
  <input id="publish_unpublish" name="publish_unpublish" type="hidden" value="" />
159
- <input type="hidden" name="theme_id" value="1">
160
  </form>
161
  </div>
162
 
@@ -173,15 +173,15 @@ class GMWDViewMaps_gmwd extends GMWDView{
173
  $query_url_polygon = $urls["polygon"] ;
174
  $query_url_polyline = $urls["polyline"] ;
175
 
176
- $main_tabs = array("map" => __("Map","gmwd"), "settings" => __("Settings","gmwd"), "theme_preview" => __("Theme / Preview","gmwd"));
177
- $whitelist = array( '127.0.0.1', '::1' );
178
- $is_localhost = in_array( $_SERVER['REMOTE_ADDR'], $whitelist) ? 1 : 0;
179
- $is_https = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $is_localhost ? 1 : 0;
180
 
181
  ?>
182
- <div class="gmwd_opacity_div">
183
- <div class="gmwd_opacity_div_loading"><img src="<?php echo GMWD_URL."/images/loading.gif";?>"></div>
184
- </div>
185
  <div class="gmwd_edit">
186
  <h2>
187
  <img src="<?php echo GMWD_URL . '/images/icon-map.png';?>" width="30" style="vertical-align:middle;">
128
  <?php echo $row->title;?>
129
  </a>
130
  </td>
131
+ <td class="shortcode column-shortcode">
132
+ <input type="text" style="border: 1px solid #eee; padding: 1px 4px;background: rgba(208, 203, 203, 0.1);width: 240px;" value="<?php echo '[Google_Maps_WD id='.$row->shortcode_id.' map='.$row->id.']';?>" readonly onclick="jQuery(this).focus();jQuery(this).select();">
133
  </td>
134
+ <td class="php_function column-php_function">
135
+ <input type="text" style="border: 1px solid #eee; padding: 1px 4px;background: rgba(208, 203, 203, 0.1);" value="&#60;?php gmwd_map( <?php echo $row->shortcode_id; ?>, <?php echo $row->id; ?>); ?&#62;" readonly onclick="jQuery(this).focus();jQuery(this).select();">
136
  </td>
137
 
138
  <td class="table_big_col" align="center">
156
  <input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
157
  <input id="current_id" name="current_id" type="hidden" value="" />
158
  <input id="publish_unpublish" name="publish_unpublish" type="hidden" value="" />
159
+ <input type="hidden" name="theme_id" value="1">
160
  </form>
161
  </div>
162
 
173
  $query_url_polygon = $urls["polygon"] ;
174
  $query_url_polyline = $urls["polyline"] ;
175
 
176
+ $main_tabs = array("map" => __("Map","gmwd"), "settings" => __("Settings","gmwd"), "theme_preview" => __("Theme / Preview","gmwd"));
177
+ $whitelist = array( '127.0.0.1', '::1' );
178
+ $is_localhost = in_array( $_SERVER['REMOTE_ADDR'], $whitelist) ? 1 : 0;
179
+ $is_https = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $is_localhost ? 1 : 0;
180
 
181
  ?>
182
+ <div class="gmwd_opacity_div">
183
+ <div class="gmwd_opacity_div_loading"><img src="<?php echo GMWD_URL."/images/loading.gif";?>"></div>
184
+ </div>
185
  <div class="gmwd_edit">
186
  <h2>
187
  <img src="<?php echo GMWD_URL . '/images/icon-map.png';?>" width="30" style="vertical-align:middle;">
admin/views/GMWDViewMarkers_gmwd.php CHANGED
@@ -210,7 +210,7 @@ class GMWDViewMarkers_gmwd extends GMWDView{
210
  <script>
211
  var _type = "markers";
212
  var GMWD_URL = "<?php echo GMWD_URL;?>";
213
- var _hiddenName = "<?php echo isset($_GET["hiddenName"]) ? sanitize_text_field(stripslashes($_GET["hiddenName"])) : ""; ?>";
214
  var markerDefaultIcon = "<?php echo gmwd_get_option("marker_default_icon");?>";
215
 
216
  </script>
210
  <script>
211
  var _type = "markers";
212
  var GMWD_URL = "<?php echo GMWD_URL;?>";
213
+ var _hiddenName = "<?php echo isset($_GET["hiddenName"]) ? sanitize_text_field(stripslashes($_GET["hiddenName"])) : ""; ?>";
214
  var markerDefaultIcon = "<?php echo gmwd_get_option("marker_default_icon");?>";
215
 
216
  </script>
admin/views/GMWDViewOptions_gmwd.php CHANGED
@@ -87,9 +87,9 @@ class GMWDViewOptions_gmwd extends GMWDView{
87
  <tr>
88
  <td style="width:15%;"><label for="address" title="<?php _e("Set Center Address of your Google Map","gmwd");?>"><?php _e("Center address","gmwd");?>:</label></td>
89
  <td>
90
- <input type="text" name="center_address" id="address" value="<?php echo $options->center_address;?>" autocomplete="off" ><br>
91
- <small><em><?php _e("Or Right Click on the Map.","gmwd");?></em></small>
92
- </td>
93
  </tr>
94
  <tr>
95
  <td><label for="center_lat" title="<?php _e("Google Map's Center Latitude","gmwd");?>"><?php _e("Center Lat","gmwd");?>:</label></td>
@@ -167,7 +167,7 @@ class GMWDViewOptions_gmwd extends GMWDView{
167
  var mapDragable = Number(<?php echo $options->map_draggable;?>) == 1 ? true : false;
168
  var centerLat = Number(<?php echo $options->center_lat;?>);
169
  var centerLng = Number(<?php echo $options->center_lng;?>);
170
- var centerAddress = '<?php echo gmwd_get_option("center_address");?>';
171
  var map;
172
 
173
  </script>
87
  <tr>
88
  <td style="width:15%;"><label for="address" title="<?php _e("Set Center Address of your Google Map","gmwd");?>"><?php _e("Center address","gmwd");?>:</label></td>
89
  <td>
90
+ <input type="text" name="center_address" id="address" value="<?php echo $options->center_address;?>" autocomplete="off" ><br>
91
+ <small><em><?php _e("Or Right Click on the Map.","gmwd");?></em></small>
92
+ </td>
93
  </tr>
94
  <tr>
95
  <td><label for="center_lat" title="<?php _e("Google Map's Center Latitude","gmwd");?>"><?php _e("Center Lat","gmwd");?>:</label></td>
167
  var mapDragable = Number(<?php echo $options->map_draggable;?>) == 1 ? true : false;
168
  var centerLat = Number(<?php echo $options->center_lat;?>);
169
  var centerLng = Number(<?php echo $options->center_lng;?>);
170
+ var centerAddress = '<?php echo esc_html($options->center_address);?>';
171
  var map;
172
 
173
  </script>
admin/views/GMWDViewShortcode_gmwd.php CHANGED
@@ -267,7 +267,6 @@ class GMWDViewShortcode_gmwd extends GMWDView{
267
 
268
  currentIdStr = editorText.substring(start + 1, end);
269
  currentIdStr = currentIdStr.substring(currentIdStr.indexOf(" ") + 1);
270
- console.log(currentIdStr);
271
  currentIdArray = currentIdStr.split("=");
272
  var currentId = currentIdArray[1].substring(0, currentIdArray[1].indexOf(" "));
273
  jQuery("#id").val(currentId);
267
 
268
  currentIdStr = editorText.substring(start + 1, end);
269
  currentIdStr = currentIdStr.substring(currentIdStr.indexOf(" ") + 1);
 
270
  currentIdArray = currentIdStr.split("=");
271
  var currentId = currentIdArray[1].substring(0, currentIdArray[1].indexOf(" "));
272
  jQuery("#id").val(currentId);
css/admin_main.css CHANGED
@@ -96,33 +96,52 @@ h1, h2, h3, h4{
96
  cursor:not-allowed !important;
97
  }
98
  .gmwd{
99
- background:#fff;
100
- padding:15px;
101
  margin-top:5px;
102
  }
103
  .gmwd_edit{
104
- padding:15px;
105
- margin-top:5px;
106
  }
107
- .gmwd input[type="text"], .gmwd input[type="number"], .gmwd_edit input[type="text"], .gmwd_edit input[type="number"]{
 
 
 
108
  padding:5px 10px !important;
109
  border:1px solid #CACACA ;
110
  height: 31px !important;
111
  }
112
 
113
- .gmwd input[type="text"], .gmwd select, .gmwd textarea, .gmwd_edit input[type="text"], .gmwd_edit select, .gmwd_edit textarea{
 
 
 
 
 
114
  padding:5px 10px !important;
115
  }
116
- .gmwd select, .gmwd_edit select {
117
- height: 31px !important;
118
- background: url(../images/css/arrow.png) no-repeat right center;
119
- -webkit-appearance: none;
120
- background-position-x: 96%;
121
- line-height: 16px;
122
- padding-right: 21px !important;
123
- }
124
-
125
- .gmwd input[type="text"]:focus, .gmwd input[type="number"]:focus, .gmwd select:focus, .gmwd textarea:focus, .gmwd_edit input[type="text"]:focus, .gmwd_edit input[type="number"]:focus, .gmwd_edit select:focus, .gmwd_edit textarea:focus, .gmwd_edit button:focus{
 
 
 
 
 
 
 
 
 
 
 
126
  outline:none !important;
127
  border:1px solid #00A0D2 !important;
128
  box-shadow:none !important;
96
  cursor:not-allowed !important;
97
  }
98
  .gmwd{
99
+ background:#fff;
100
+ padding:15px;
101
  margin-top:5px;
102
  }
103
  .gmwd_edit{
104
+ padding:15px;
105
+ margin-top:5px;
106
  }
107
+ .gmwd input[type="text"],
108
+ .gmwd input[type="number"],
109
+ .gmwd_edit input[type="text"],
110
+ .gmwd_edit input[type="number"]{
111
  padding:5px 10px !important;
112
  border:1px solid #CACACA ;
113
  height: 31px !important;
114
  }
115
 
116
+ .gmwd input[type="text"],
117
+ .gmwd select,
118
+ .gmwd textarea,
119
+ .gmwd_edit input[type="text"],
120
+ .gmwd_edit select,
121
+ .gmwd_edit textarea{
122
  padding:5px 10px !important;
123
  }
124
+ .gmwd select,
125
+ .gmwd_edit select {
126
+ height: 31px !important;
127
+ background: url(../images/css/arrow.png) no-repeat right center;
128
+ -webkit-appearance: none;
129
+ background-position-x: 93%;
130
+ line-height: 16px;
131
+ padding-right: 21px !important;
132
+ border: 1px solid #CACACA;
133
+ vertical-align: bottom;
134
+ }
135
+
136
+ .gmwd input[type="text"]:focus,
137
+ .gmwd input[type="number"]:focus,
138
+ .gmwd select:focus,
139
+ .gmwd textarea:focus,
140
+ .gmwd_edit input[type="text"]:focus,
141
+ .gmwd_edit input[type="number"]:focus,
142
+ .gmwd_edit select:focus,
143
+ .gmwd_edit textarea:focus,
144
+ .gmwd_edit button:focus{
145
  outline:none !important;
146
  border:1px solid #00A0D2 !important;
147
  box-shadow:none !important;
framework/GMWDHelper.php CHANGED
@@ -244,7 +244,7 @@ class GMWDHelper {
244
  }
245
 
246
  public static function print_message() {
247
- $message_id = isset($_GET["message_id"]) ? sanitize_text_field($_GET["message_id"]) : "";
248
  if(!ctype_digit($message_id) && $message_id ){
249
  echo '<div style="width:99%"><div class="error"><p><strong>'.$message_id .'</strong></p></div></div>';
250
  return;
244
  }
245
 
246
  public static function print_message() {
247
+ $message_id = isset($_GET["message_id"]) ? esc_html(stripslashes($_GET["message_id"])) : "";
248
  if(!ctype_digit($message_id) && $message_id ){
249
  echo '<div style="width:99%"><div class="error"><p><strong>'.$message_id .'</strong></p></div></div>';
250
  return;
frontend/views/GMWDViewFrontendMap.php CHANGED
@@ -164,7 +164,7 @@ class GMWDViewFrontendMap extends GMWDViewFrontend{
164
  <?php
165
  if(!isset($params["widget"])){
166
  //store locator
167
- if(($row->store_locator_position == 0 || $row->store_locator_position == 1) && $row->enable_store_locator == 1){
168
  $this->display_store_locator($row, $theme, $shortcode_id);
169
  }
170
 
164
  <?php
165
  if(!isset($params["widget"])){
166
  //store locator
167
+ if(($row->store_locator_position == "" || $row->store_locator_position == 1) && $row->enable_store_locator == 1){
168
  $this->display_store_locator($row, $theme, $shortcode_id);
169
  }
170
 
js/init_map.js CHANGED
@@ -74,6 +74,12 @@ function gmwdInitMainMap(el, excludeOverlays, key){
74
 
75
  }
76
 
 
 
 
 
 
 
77
  function gmwdSetMapMarkers(_key){
78
  var mapMarker;
79
  if(Object.keys(gmwdmapData["mapMarkers" + _key]).length > 0){
@@ -106,8 +112,8 @@ function gmwdSetMapMarkers(_key){
106
  gmwdmapData["infoWindows" + _key].push(infoWindow);
107
  }
108
 
109
- if(mapMarker.title){
110
- marker.setTitle(mapMarker.title);
111
  }
112
 
113
  if(mapMarker.animation == "BOUNCE"){
74
 
75
  }
76
 
77
+ function decodeEntities(encodedString) {
78
+ var textArea = document.createElement('textarea');
79
+ textArea.innerHTML = encodedString;
80
+ return textArea.value;
81
+ }
82
+
83
  function gmwdSetMapMarkers(_key){
84
  var mapMarker;
85
  if(Object.keys(gmwdmapData["mapMarkers" + _key]).length > 0){
112
  gmwdmapData["infoWindows" + _key].push(infoWindow);
113
  }
114
 
115
+ if (mapMarker.title) {
116
+ marker.setTitle(decodeEntities(mapMarker.title));
117
  }
118
 
119
  if(mapMarker.animation == "BOUNCE"){
js/maps_gmwd.js CHANGED
@@ -131,17 +131,17 @@ jQuery( document ).ready(function() {
131
  });
132
 
133
  // map zoom level
134
- jQuery("#zoom_level").on("bind", "slider:ready slider:changed", function (event, data) {
135
  zoom = Number(data.value.toFixed(1));
136
  map.setZoom(zoom);
137
  });
138
  // map min zoom
139
- jQuery("#min_zoom").on("bind", "slider:ready slider:changed", function (event, data) {
140
  minZoom = Number(data.value.toFixed(1));
141
  gmwdSetMapOptions();
142
  });
143
  // map max zoom
144
- jQuery("max_zoom").on("bind", "slider:ready slider:changed", function (event, data) {
145
  maxZoom = Number(data.value.toFixed(1));
146
  gmwdSetMapOptions();
147
  });
131
  });
132
 
133
  // map zoom level
134
+ jQuery("#zoom_level").bind("slider:ready slider:changed", function (event, data) {
135
  zoom = Number(data.value.toFixed(1));
136
  map.setZoom(zoom);
137
  });
138
  // map min zoom
139
+ jQuery("#min_zoom").bind("slider:ready slider:changed", function (event, data) {
140
  minZoom = Number(data.value.toFixed(1));
141
  gmwdSetMapOptions();
142
  });
143
  // map max zoom
144
+ jQuery("max_zoom").bind("slider:ready slider:changed", function (event, data) {
145
  maxZoom = Number(data.value.toFixed(1));
146
  gmwdSetMapOptions();
147
  });
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.7
6
- Stable tag: 1.0.68
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -138,6 +138,8 @@ Activate 10Web Google Maps by going to Plugins and pressing Activate button.
138
  10. 10Web Google Maps - Google Maps Polygons and Polylines
139
 
140
  == Changelog ==
 
 
141
 
142
  = 1.0.68 =
143
  * Fixed: Load more button functionality.
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.7
6
+ Stable tag: 1.0.69
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
138
  10. 10Web Google Maps - Google Maps Polygons and Polylines
139
 
140
  == Changelog ==
141
+ = 1.0.69 =
142
+ * Fixed: Vulnerabilities.
143
 
144
  = 1.0.68 =
145
  * Fixed: Load more button functionality.
wd-google-maps.php CHANGED
@@ -1,10 +1,9 @@
1
  <?php
2
-
3
  /**
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.68
8
  * Author: 10Web
9
  * Author URI: https://10web.io/plugins
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
1
  <?php
 
2
  /**
3
  * Plugin Name: 10Web Google Maps
4
  * Plugin URI: https://10web.io/plugins/wordpress-google-maps/
5
  * Description: 10Web Google Maps is an intuitive tool for creating Google maps with advanced markers, custom layers and overlays for your website.
6
+ * Version: 1.0.69
7
  * Author: 10Web
8
  * Author URI: https://10web.io/plugins
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html