WP Google Maps - Version 7.11.44

Version Description

:- 2019-08-01 :- Low priority = * Added REST API parameter skipNonceCheck for Live Tracking App * Fixed map type settings not "live" in map edit page * Fixed map type setting not reflected when map edit page initialises

Download this release

Release Info

Developer perryrylance
Plugin Icon 128x128 WP Google Maps
Version 7.11.44
Comparing to
See all releases

Code changes from version 7.11.43 to 7.11.44

includes/class.factory.php CHANGED
@@ -31,6 +31,7 @@ class Factory
31
  if($class == 'WPGMZA\Factory')
32
  throw new \Exception('Factory createInstance would return abstract Factory');
33
 
 
34
  if(empty($args))
35
  $filter_args = array($filter, null);
36
  else
31
  if($class == 'WPGMZA\Factory')
32
  throw new \Exception('Factory createInstance would return abstract Factory');
33
 
34
+ // TODO: If the created object is a descendant of CRUD
35
  if(empty($args))
36
  $filter_args = array($filter, null);
37
  else
includes/class.rest-api.php CHANGED
@@ -115,7 +115,14 @@ class RestAPI extends Factory
115
  {
116
  global $wpgmza;
117
 
118
- $doActionNonceCheck = !$methodIsOnlyGET && (!$wpgmza->isProVersion() || version_compare($wpgmza->getProVersion(), '7.11.47', '>='));
 
 
 
 
 
 
 
119
 
120
  if($doActionNonceCheck && !$this->checkActionNonce($route))
121
  return new \WP_Error('wpgmza_action_not_allowed', 'You do not have permission to perform this action', array('status' => 403));
115
  {
116
  global $wpgmza;
117
 
118
+ $doActionNonceCheck =
119
+ empty($args['skipNonceCheck']) &&
120
+ !$methodIsOnlyGET &&
121
+ (
122
+ !$wpgmza->isProVersion()
123
+ ||
124
+ version_compare($wpgmza->getProVersion(), '7.11.47', '>=')
125
+ );
126
 
127
  if($doActionNonceCheck && !$this->checkActionNonce($route))
128
  return new \WP_Error('wpgmza_action_not_allowed', 'You do not have permission to perform this action', array('status' => 403));
js/wpgmaps-admin-core.js CHANGED
@@ -333,8 +333,13 @@
333
  });
334
 
335
  jQuery('#wpgmza_map_type').on('change', function (e) {
 
 
 
 
336
  var optionSelected = jQuery("option:selected", this);
337
  var valueSelected = this.value;
 
338
  if (typeof valueSelected !== "undefined") {
339
  if (valueSelected === "1") { maptype = google.maps.MapTypeId.ROADMAP; }
340
  else if (valueSelected === "2") { maptype = google.maps.MapTypeId.SATELLITE; }
@@ -344,7 +349,8 @@
344
  } else {
345
  maptype = google.maps.MapTypeId.ROADMAP;
346
  }
347
- MYMAP.map.setMapTypeId(maptype);
 
348
  });
349
 
350
 
@@ -708,6 +714,10 @@ MYMAP.init = function(selector, latLng, zoom) {
708
  }
709
 
710
  this.map = WPGMZA.Map.createInstance(jQuery(selector)[0], myOptions);
 
 
 
 
711
  //this.bounds = new google.maps.LatLngBounds();
712
 
713
  if ("undefined" !== typeof wpgmaps_localize[wpgmaps_mapid]['other_settings']['wpgmza_theme_data'] && wpgmaps_localize[wpgmaps_mapid]['other_settings']['wpgmza_theme_data'] !== false && wpgmaps_localize[wpgmaps_mapid]['other_settings']['wpgmza_theme_data'] !== "") {
333
  });
334
 
335
  jQuery('#wpgmza_map_type').on('change', function (e) {
336
+
337
+ if(WPGMZA.settings.engine && WPGMZA.settings.engine != "google-maps")
338
+ return;
339
+
340
  var optionSelected = jQuery("option:selected", this);
341
  var valueSelected = this.value;
342
+
343
  if (typeof valueSelected !== "undefined") {
344
  if (valueSelected === "1") { maptype = google.maps.MapTypeId.ROADMAP; }
345
  else if (valueSelected === "2") { maptype = google.maps.MapTypeId.SATELLITE; }
349
  } else {
350
  maptype = google.maps.MapTypeId.ROADMAP;
351
  }
352
+
353
+ MYMAP.map.setOptions({mapTypeId: maptype});
354
  });
355
 
356
 
714
  }
715
 
716
  this.map = WPGMZA.Map.createInstance(jQuery(selector)[0], myOptions);
717
+
718
+ this.map.setOptions({
719
+ mapTypeId: maptype
720
+ });
721
  //this.bounds = new google.maps.LatLngBounds();
722
 
723
  if ("undefined" !== typeof wpgmaps_localize[wpgmaps_mapid]['other_settings']['wpgmza_theme_data'] && wpgmaps_localize[wpgmaps_mapid]['other_settings']['wpgmza_theme_data'] !== false && wpgmaps_localize[wpgmaps_mapid]['other_settings']['wpgmza_theme_data'] !== "") {
legacy-core.php CHANGED
@@ -803,8 +803,13 @@ function wpgmaps_admin_javascript_basic() {
803
  else if (is_admin() && isset( $_GET['page'] ) && $_GET['page'] == 'wp-google-maps-menu' && isset( $_GET['action'] ) && $_GET['action'] == "edit") {
804
 
805
  if (!$_GET['map_id']) { return; }
806
- $wpgmza_check = wpgmaps_update_xml_file(sanitize_text_field($_GET['map_id']));
807
- if ( is_wp_error($wpgmza_check) ) wpgmza_return_error($wpgmza_check);
 
 
 
 
 
808
 
809
  $wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
810
 
803
  else if (is_admin() && isset( $_GET['page'] ) && $_GET['page'] == 'wp-google-maps-menu' && isset( $_GET['action'] ) && $_GET['action'] == "edit") {
804
 
805
  if (!$_GET['map_id']) { return; }
806
+
807
+ if(!empty($_POST))
808
+ {
809
+ $wpgmza_check = wpgmaps_update_xml_file(sanitize_text_field($_GET['map_id']));
810
+
811
+ if ( is_wp_error($wpgmza_check) ) wpgmza_return_error($wpgmza_check);
812
+ }
813
 
814
  $wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
815
 
readme.txt CHANGED
@@ -220,6 +220,11 @@ Please upgrade your version of WP Google Maps to version 6.0.27 as it includes m
220
 
221
  == Changelog ==
222
 
 
 
 
 
 
223
  = 7.11.43 :- 2019-07-31 :- Low priority =
224
  * RestAPI now exposes registerRoute as a public function for add-ons to register REST API routes
225
  * New action wpgmza_register_rest_api_routes added
@@ -1251,3 +1256,7 @@ For more, please view the WP Google Maps site
1251
 
1252
 
1253
 
 
 
 
 
220
 
221
  == Changelog ==
222
 
223
+ = 7.11.44 :- 2019-08-01 :- Low priority =
224
+ * Added REST API parameter skipNonceCheck for Live Tracking App
225
+ * Fixed map type settings not "live" in map edit page
226
+ * Fixed map type setting not reflected when map edit page initialises
227
+
228
  = 7.11.43 :- 2019-07-31 :- Low priority =
229
  * RestAPI now exposes registerRoute as a public function for add-ons to register REST API routes
230
  * New action wpgmza_register_rest_api_routes added
1256
 
1257
 
1258
 
1259
+
1260
+
1261
+
1262
+
wpGoogleMaps.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Google Maps
4
  Plugin URI: https://www.wpgmaps.com
5
  Description: The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss.
6
- Version: 7.11.43
7
  Author: WP Google Maps
8
  Author URI: https://www.wpgmaps.com
9
  Text Domain: wp-google-maps
@@ -11,6 +11,11 @@ Domain Path: /languages
11
  */
12
 
13
  /*
 
 
 
 
 
14
  * 7.11.43 :- 2019-07-31 :- Low priority
15
  * RestAPI now exposes registerRoute as a public function for add-ons to register REST API routes
16
  * New action wpgmza_register_rest_api_routes added
3
  Plugin Name: WP Google Maps
4
  Plugin URI: https://www.wpgmaps.com
5
  Description: The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss.
6
+ Version: 7.11.44
7
  Author: WP Google Maps
8
  Author URI: https://www.wpgmaps.com
9
  Text Domain: wp-google-maps
11
  */
12
 
13
  /*
14
+ * 7.11.44 :- 2019-08-01 :- Low priority
15
+ * Added REST API parameter skipNonceCheck for Live Tracking App
16
+ * Fixed map type settings not "live" in map edit page
17
+ * Fixed map type setting not reflected when map edit page initialises
18
+ *
19
  * 7.11.43 :- 2019-07-31 :- Low priority
20
  * RestAPI now exposes registerRoute as a public function for add-ons to register REST API routes
21
  * New action wpgmza_register_rest_api_routes added