WP Google Maps - Version 6.4.05

Version Description

  • 2017-06-13 - Medium priority =
  • Fixed the bug that caused JS errors to show up in the map editor
  • Fixed a bug that caused the XML File option (for markers) to cause issues when trying to add a marker in the backend
  • Allowed users to hide the subscribe feature in the plugins page
  • New feature: Bulk delete markers
  • Autocomplete now works when adding markers
  • Autocomplete now works for the store locator on the front end
  • Fixed a bug that caused the map to not load in the map editor for new installations
Download this release

Release Info

Developer WPGMaps
Plugin Icon 128x128 WP Google Maps
Version 6.4.05
Comparing to
See all releases

Code changes from version 6.4.04 to 6.4.05

base/includes/wp-google-maps-polygons.php CHANGED
@@ -80,7 +80,7 @@ function wpgmza_b_pro_add_poly($mid) {
80
  </div>
81
 
82
  <p style='clear: both;'>Polygon data:<br /><textarea name=\"wpgmza_polygon\" id=\"poly_line_list\" style=\"width:90%; height:100px; border:1px solid #ccc; background-color:#FFF; padding:5px; overflow:auto;\"></textarea>
83
- <p style='clear: both;'>Polygon data:<br /><textarea name=\"wpgmza_polygon_inner\" id=\"poly_line_list_inner\" style=\"width:90%; height:100px; border:1px solid #ccc; background-color:#FFF; padding:5px; overflow:auto;\"></textarea>
84
  <p class='submit'><a href='javascript:history.back();' class='button button-secondary' title='".__("Cancel")."'>".__("Cancel")."</a> <input type='submit' name='wpgmza_save_poly' class='button-primary' value='".__("Save Polygon","wp-google-maps")." &raquo;' /></p>
85
 
86
  </form>
@@ -165,7 +165,7 @@ function wpgmza_b_pro_edit_poly($mid) {
165
 
166
 
167
  <p style='clear: both;' >Polygon data:<br /><textarea name=\"wpgmza_polygon\" id=\"poly_line_list\" style=\"width:90%; height:100px; border:1px solid #ccc; background-color:#FFF; padding:5px; overflow:auto;\"></textarea>
168
- <p style='clear: both;' >Polygon data (inner):<br /><textarea name=\"wpgmza_polygon_inner\" id=\"poly_line_list_inner\" style=\"width:90%; height:100px; border:1px solid #ccc; background-color:#FFF; padding:5px; overflow:auto;\">".$pol->innerpolydata."</textarea>
169
  <p class='submit'><a href='javascript:history.back();' class='button button-secondary' title='".__("Cancel")."'>".__("Cancel")."</a> <input type='submit' name='wpgmza_edit_poly' class='button-primary' value='".__("Save Polygon","wp-google-maps")." &raquo;' /></p>
170
 
171
  </form>
80
  </div>
81
 
82
  <p style='clear: both;'>Polygon data:<br /><textarea name=\"wpgmza_polygon\" id=\"poly_line_list\" style=\"width:90%; height:100px; border:1px solid #ccc; background-color:#FFF; padding:5px; overflow:auto;\"></textarea>
83
+ <!-- <p style='clear: both;'>Polygon data:<br /><textarea name=\"wpgmza_polygon_inner\" id=\"poly_line_list_inner\" style=\"width:90%; height:100px; border:1px solid #ccc; background-color:#FFF; padding:5px; overflow:auto;\"></textarea> -->
84
  <p class='submit'><a href='javascript:history.back();' class='button button-secondary' title='".__("Cancel")."'>".__("Cancel")."</a> <input type='submit' name='wpgmza_save_poly' class='button-primary' value='".__("Save Polygon","wp-google-maps")." &raquo;' /></p>
85
 
86
  </form>
165
 
166
 
167
  <p style='clear: both;' >Polygon data:<br /><textarea name=\"wpgmza_polygon\" id=\"poly_line_list\" style=\"width:90%; height:100px; border:1px solid #ccc; background-color:#FFF; padding:5px; overflow:auto;\"></textarea>
168
+ <!-- <p style='clear: both;' >Polygon data (inner):<br /><textarea name=\"wpgmza_polygon_inner\" id=\"poly_line_list_inner\" style=\"width:90%; height:100px; border:1px solid #ccc; background-color:#FFF; padding:5px; overflow:auto;\">".$pol->innerpolydata."</textarea> -->
169
  <p class='submit'><a href='javascript:history.back();' class='button button-secondary' title='".__("Cancel")."'>".__("Cancel")."</a> <input type='submit' name='wpgmza_edit_poly' class='button-primary' value='".__("Save Polygon","wp-google-maps")." &raquo;' /></p>
170
 
171
  </form>
css/wpgmza_style.css CHANGED
@@ -6,7 +6,19 @@
6
  .wpgmza_hide_input { display:none !important; }
7
  .wpgmza_theme_selection { margin-right:20px; margin-bottom:20px; cursor:pointer; border-radius:4px; }
8
 
 
 
 
 
 
9
 
 
 
 
 
 
 
 
10
  .wpgmza_map img {
11
  border: none !important;
12
  background-color:transparent !important;
@@ -403,19 +415,7 @@ ul.wpgmza_marker_list_class {
403
  margin-bottom: 20px;
404
  }
405
 
406
- .wpgmza-not-found-msg {
407
- display: none;
408
- margin-top: 20px;
409
- color: #777;
410
- }
411
-
412
- .wpgmza-not-found-msg.is-active {
413
- display: block;
414
- }
415
 
416
- .wpgmza-not-found-msg p {
417
- margin-bottom: 0;
418
- }
419
 
420
  .wpgmaps_fullscreen {
421
  position: fixed !important;
@@ -425,4 +425,4 @@ ul.wpgmza_marker_list_class {
425
  height: 100% !important;
426
  z-index:9999;
427
 
428
- }
6
  .wpgmza_hide_input { display:none !important; }
7
  .wpgmza_theme_selection { margin-right:20px; margin-bottom:20px; cursor:pointer; border-radius:4px; }
8
 
9
+ .wpgmza-not-found-msg {
10
+ display: none;
11
+ margin-top: 20px;
12
+ color: #777;
13
+ }
14
 
15
+ .wpgmza-not-found-msg.is-active {
16
+ display: block;
17
+ }
18
+
19
+ .wpgmza-not-found-msg p {
20
+ margin-bottom: 0;
21
+ }
22
  .wpgmza_map img {
23
  border: none !important;
24
  background-color:transparent !important;
415
  margin-bottom: 20px;
416
  }
417
 
 
 
 
 
 
 
 
 
 
418
 
 
 
 
419
 
420
  .wpgmaps_fullscreen {
421
  position: fixed !important;
425
  height: 100% !important;
426
  z-index:9999;
427
 
428
+ }
js/wpgmaps-admin-core.js CHANGED
@@ -1,15 +1,17 @@
 
 
1
  (function($) {
 
 
 
 
 
 
 
 
 
 
2
 
3
- var placeSearch, autocomplete;
4
- var wpgmza_table_length;
5
- var wpgmzaTable;
6
- var marker_added = false;
7
- var wpgmaps_markers_array = [];
8
- var infoWindow = new Array();
9
- var tmp_marker;
10
- var WPGM_Path_Polygon = new Array();
11
- var WPGM_Path = new Array();
12
- var saveReminderBound = false;
13
 
14
  if ('undefined' == typeof window.jQuery) {
15
  alert("jQuery is not installed. WP Google Maps requires jQuery in order to function properly. Please ensure you have jQuery installed.")
@@ -342,7 +344,8 @@
342
 
343
  marker_id = returned_data.marker_id;
344
  marker_data = returned_data.marker_data[marker_id];
345
- wpgmaps_localize_marker_data[marker_id] = marker_data;
 
346
  marker_data.map = MYMAP.map;
347
 
348
  marker_data.point = new google.maps.LatLng(wpgm_lat,wpgm_lng);
@@ -395,7 +398,7 @@
395
 
396
  marker_id = returned_data.marker_id;
397
  marker_data = returned_data.marker_data[marker_id];
398
- wpgmaps_localize_marker_data[marker_id] = marker_data;
399
  marker_data.map = MYMAP.map;
400
 
401
  marker_data.point = new google.maps.LatLng(wpgm_lat,wpgm_lng);
@@ -482,7 +485,7 @@
482
  returned_data = JSON.parse(response);
483
  marker_id = returned_data.marker_id;
484
  marker_data = returned_data.marker_data[marker_id];
485
- wpgmaps_localize_marker_data[marker_id] = marker_data;
486
  marker_data.map = MYMAP.map;
487
 
488
  marker_data.point = new google.maps.LatLng(wpgm_lat,wpgm_lng);
@@ -528,7 +531,7 @@
528
  marker_id = returned_data.marker_id;
529
  marker_data = returned_data.marker_data[marker_id];
530
 
531
- wpgmaps_localize_marker_data[marker_id] = marker_data;
532
  marker_data.map = MYMAP.map;
533
 
534
  marker_data.point = new google.maps.LatLng(wpgm_lat,wpgm_lng);
@@ -556,7 +559,7 @@
556
  });
557
  });
558
 
559
- var MYMAP = {
560
  map: null,
561
  bounds: null
562
  }
@@ -697,7 +700,7 @@ MYMAP.init = function(selector, latLng, zoom) {
697
  }
698
 
699
 
700
- if (typeof wpgmaps_localize_global_settings['wpgmza_settings_infowindow_width'] !== "undefined" && wpgmaps_localize_global_settings['wpgmza_settings_infowindow_width'] !== "") { infoWindow.setOptions({maxWidth:wpgmaps_localize_global_settings['wpgmza_settings_infowindow_width']}); }
701
 
702
  google.maps.event.addDomListener(window, 'resize', function() {
703
  var myLatLng = new google.maps.LatLng(wpgmaps_localize[wpgmaps_mapid].map_start_lat,wpgmaps_localize[wpgmaps_mapid].map_start_lng);
@@ -996,18 +999,21 @@ function add_polygon(polygonid) {
996
  polygon_center = bounds.getCenter();
997
 
998
  if (tmp_data['title'] !== "") {
999
- infoWindow_poly[polygonid] = new google.maps.InfoWindow();
1000
- google.maps.event.addListener(WPGM_Path_Polygon[polygonid], 'click', function(event) {
1001
- infoWindow_poly[polygonid].setPosition(event.latLng);
1002
- content = "";
1003
- if (tmp_data['link'] !== "") {
1004
- var content = "<a href='"+tmp_data['link']+"'>"+tmp_data['title']+"</a>";
1005
- } else {
1006
- var content = tmp_data['title'];
1007
- }
1008
- infoWindow_poly[polygonid].setContent(content);
1009
- infoWindow_poly[polygonid].open(MYMAP.map,this.position);
1010
- });
 
 
 
1011
  }
1012
 
1013
 
1
+
2
+
3
  (function($) {
4
+ var placeSearch, autocomplete;
5
+ var wpgmza_table_length;
6
+ var wpgmzaTable;
7
+ var marker_added = false;
8
+ var wpgmaps_markers_array = [];
9
+ var infoWindow = new Array();
10
+ var tmp_marker;
11
+ var WPGM_Path_Polygon = new Array();
12
+ var WPGM_Path = new Array();
13
+ var saveReminderBound = false;
14
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  if ('undefined' == typeof window.jQuery) {
17
  alert("jQuery is not installed. WP Google Maps requires jQuery in order to function properly. Please ensure you have jQuery installed.")
344
 
345
  marker_id = returned_data.marker_id;
346
  marker_data = returned_data.marker_data[marker_id];
347
+
348
+ if (typeof wpgmaps_localize_marker_data !== "undefined") { wpgmaps_localize_marker_data[marker_id] = marker_data; }
349
  marker_data.map = MYMAP.map;
350
 
351
  marker_data.point = new google.maps.LatLng(wpgm_lat,wpgm_lng);
398
 
399
  marker_id = returned_data.marker_id;
400
  marker_data = returned_data.marker_data[marker_id];
401
+ if (typeof wpgmaps_localize_marker_data !== "undefined") { wpgmaps_localize_marker_data[marker_id] = marker_data; }
402
  marker_data.map = MYMAP.map;
403
 
404
  marker_data.point = new google.maps.LatLng(wpgm_lat,wpgm_lng);
485
  returned_data = JSON.parse(response);
486
  marker_id = returned_data.marker_id;
487
  marker_data = returned_data.marker_data[marker_id];
488
+ if (typeof wpgmaps_localize_marker_data !== "undefined") { wpgmaps_localize_marker_data[marker_id] = marker_data; }
489
  marker_data.map = MYMAP.map;
490
 
491
  marker_data.point = new google.maps.LatLng(wpgm_lat,wpgm_lng);
531
  marker_id = returned_data.marker_id;
532
  marker_data = returned_data.marker_data[marker_id];
533
 
534
+ if (typeof wpgmaps_localize_marker_data !== "undefined") { wpgmaps_localize_marker_data[marker_id] = marker_data; }
535
  marker_data.map = MYMAP.map;
536
 
537
  marker_data.point = new google.maps.LatLng(wpgm_lat,wpgm_lng);
559
  });
560
  });
561
 
562
+ MYMAP = {
563
  map: null,
564
  bounds: null
565
  }
700
  }
701
 
702
 
703
+ if (typeof wpgmaps_localize_global_settings['wpgmza_settings_infowindow_width'] !== "undefined" && wpgmaps_localize_global_settings['wpgmza_settings_infowindow_width'] !== "" && typeof infoWindow !== "undefined" && typeof infoWindow.setOptions !== "undefined") { infoWindow.setOptions({maxWidth:wpgmaps_localize_global_settings['wpgmza_settings_infowindow_width']}); }
704
 
705
  google.maps.event.addDomListener(window, 'resize', function() {
706
  var myLatLng = new google.maps.LatLng(wpgmaps_localize[wpgmaps_mapid].map_start_lat,wpgmaps_localize[wpgmaps_mapid].map_start_lng);
999
  polygon_center = bounds.getCenter();
1000
 
1001
  if (tmp_data['title'] !== "") {
1002
+ if(!window.infoWindow_poly) {
1003
+ infoWindow_poly = {};
1004
+ }
1005
+ infoWindow_poly[polygonid] = new google.maps.InfoWindow();
1006
+ google.maps.event.addListener(WPGM_Path_Polygon[polygonid], 'click', function(event) {
1007
+ infoWindow_poly[polygonid].setPosition(event.latLng);
1008
+ content = "";
1009
+ if (tmp_data['link'] !== "") {
1010
+ var content = "<a href='"+tmp_data['link']+"'>"+tmp_data['title']+"</a>";
1011
+ } else {
1012
+ var content = tmp_data['title'];
1013
+ }
1014
+ infoWindow_poly[polygonid].setContent(content);
1015
+ infoWindow_poly[polygonid].open(MYMAP.map,this.position);
1016
+ });
1017
  }
1018
 
1019
 
js/wpgmaps.js CHANGED
@@ -333,7 +333,7 @@ MYMAP.placeMarkers = function(filename,map_id,radius,searched_center,distance_ty
333
  } else {
334
 
335
  if (Object.keys(wpgmaps_localize_marker_data).length > 0) {
336
- var markerStoreLocatorsNum = 0;
337
 
338
  if (typeof wpgmaps_localize_marker_data !== "undefined") {
339
 
333
  } else {
334
 
335
  if (Object.keys(wpgmaps_localize_marker_data).length > 0) {
336
+ var markerStoreLocatorsNum = 0;
337
 
338
  if (typeof wpgmaps_localize_marker_data !== "undefined") {
339
 
js/wpgmaps_plugin_row.js CHANGED
@@ -3,6 +3,7 @@ jQuery(document).ready(function(){
3
  jQuery("body").on("click", "#wpgmza_signup_newsletter_btn", function() {
4
 
5
  var a_email = jQuery("#wpgmza_signup_newsletter").val();
 
6
  jQuery("#wpgmza_signup_newsletter").hide('slow');
7
  jQuery("#wpgmza_signup_newsletter_btn").hide('slow');
8
  jQuery("#wpgmza_subscribe_div").html("Thank you!");
@@ -28,4 +29,21 @@ jQuery(document).ready(function(){
28
 
29
 
30
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  });
3
  jQuery("body").on("click", "#wpgmza_signup_newsletter_btn", function() {
4
 
5
  var a_email = jQuery("#wpgmza_signup_newsletter").val();
6
+ jQuery(".wpgmza_sub_div").hide("fast");
7
  jQuery("#wpgmza_signup_newsletter").hide('slow');
8
  jQuery("#wpgmza_signup_newsletter_btn").hide('slow');
9
  jQuery("#wpgmza_subscribe_div").html("Thank you!");
29
 
30
 
31
  });
32
+ jQuery("body").on("click", "#wpgmza_signup_newsletter_hide", function() {
33
+
34
+ jQuery(".wpgmza_sub_div").hide("fast");
35
+ jQuery("#wpgmza_signup_newsletter").hide('slow');
36
+ jQuery("#wpgmza_signup_newsletter_btn").hide('slow');
37
+ jQuery("#wpgmza_signup_newsletter_hide").hide('slow');
38
+
39
+ var data = {
40
+ action: 'wpgmza_subscribe_hide',
41
+ security: wpgmza_sub_nonce
42
+ };
43
+
44
+ jQuery.post(ajaxurl, data, function(response) {
45
+
46
+ });
47
+
48
+ });
49
  });
readme.txt CHANGED
@@ -214,6 +214,15 @@ Please upgrade your version of WP Google Maps to version 6.0.27 as it includes m
214
 
215
  == Changelog ==
216
 
 
 
 
 
 
 
 
 
 
217
  = 6.4.04 - 2017-06-08 - Low priority =
218
  * Tested on WordPress 4.8
219
 
214
 
215
  == Changelog ==
216
 
217
+ = 6.4.05 - 2017-06-13 - Medium priority =
218
+ * Fixed the bug that caused JS errors to show up in the map editor
219
+ * Fixed a bug that caused the XML File option (for markers) to cause issues when trying to add a marker in the backend
220
+ * Allowed users to hide the subscribe feature in the plugins page
221
+ * New feature: Bulk delete markers
222
+ * Autocomplete now works when adding markers
223
+ * Autocomplete now works for the store locator on the front end
224
+ * Fixed a bug that caused the map to not load in the map editor for new installations
225
+
226
  = 6.4.04 - 2017-06-08 - Low priority =
227
  * Tested on WordPress 4.8
228
 
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: 6.4.04
7
  Author: WP Google Maps
8
  Author URI: https://www.wpgmaps.com
9
  Text Domain: wp-google-maps
@@ -12,8 +12,18 @@ Domain Path: /languages
12
 
13
  /*
14
  *
 
 
 
 
 
 
 
 
 
15
  * 6.4.04 - 2017-06-08 - Low priority
16
  * Tested on WordPress 4.8
 
17
  *
18
  * 6.4.03 - 2017-02-17 - Low priority
19
  * Added the ability for affiliates to make use of their affiliate IDs in the pro links
@@ -321,7 +331,7 @@ $wpgmza_tblname_poly = $wpdb->prefix . "wpgmza_polygon";
321
  $wpgmza_tblname_polylines = $wpdb->prefix . "wpgmza_polylines";
322
  $wpgmza_tblname_categories = $wpdb->prefix. "wpgmza_categories";
323
  $wpgmza_tblname_category_maps = $wpdb->prefix. "wpgmza_category_maps";
324
- $wpgmza_version = "6.4.04";
325
  $wpgmza_p_version = "6.13";
326
  $wpgmza_t = "basic";
327
  define("WPGMAPS", $wpgmza_version);
@@ -651,6 +661,9 @@ function wpgmza_plugin_action_links( $links ) {
651
  }
652
 
653
  add_action( 'wp_ajax_wpgmza_subscribe','wpgmza_ajax_subscribe');
 
 
 
654
 
655
  function wpgmza_ajax_subscribe() {
656
  $check = check_ajax_referer( 'wpgmza_subscribe', 'security' );
@@ -660,6 +673,13 @@ function wpgmza_ajax_subscribe() {
660
  update_user_meta( $uid, 'wpgmza_subscribed', true);
661
 
662
  }
 
 
 
 
 
 
 
663
  }
664
  }
665
 
@@ -686,12 +706,13 @@ function wpgmza_plugin_row( $plugin_meta, $plugin_file, $plugin_data, $status )
686
  $check = get_user_meta(get_current_user_id(),"wpgmza_subscribed");
687
 
688
  if (!$check) {
689
- $ret = '<div style="margin-top:10px; color:#333; display:block; white-space:normal;">';
690
  $ret .= '<form>';
691
  $ret .= '<p><label for="wpgmza_signup_newsletter" style="font-style:italic; margin-bottom:5px;">' . __( 'Sign up to our newsletter and get information on the latest updates, beta versions and specials.', 'wp-google-maps' ) . '</label></p>';
692
  $ret .= '<span id="wpgmza_subscribe_div">';
693
  $ret .= '<input type="text" name="wpgmza_signup_newsletter" id="wpgmza_signup_newsletter" value="'.get_option( 'admin_email' ).'"></option>';
694
  $ret .= '<input type="button" class="button button-primary" id="wpgmza_signup_newsletter_btn" name="wpgmza_signup_newsletter_btn" value="' . __( 'Sign up', 'wp-google-maps' ) . '" />';
 
695
  $ret .= '<span>';
696
  $ret .= '</form>';
697
  $ret .= '</div>';
@@ -1034,11 +1055,11 @@ function wpgmaps_admin_javascript_basic() {
1034
  }
1035
  $wpgmza_api_key = get_option( 'wpgmza_google_maps_api_key' );
1036
  if( $wpgmza_api_key ){
1037
- wp_enqueue_script('wpgmza_api_call', '//maps.google'.$wpgmza_suffix.'/maps/api/js?'.$api_version_string.'key='.$wpgmza_api_key.'&language='.$wpgmza_locale, array(), null );
1038
  } else {
1039
  /* use temp API key */
1040
  $wpgmza_temp_api_key = get_option('wpgmza_temp_api');
1041
- wp_enqueue_script('wpgmza_api_call', '//maps.google'.$wpgmza_suffix.'/maps/api/js?'.$api_version_string.'key='+$wpgmza_temp_api_key+'&language='.$wpgmza_locale, array(), null );
1042
  }
1043
  $wpgaps_core_dependancy = array( 'wpgmza_api_call' );
1044
  }
@@ -2419,9 +2440,9 @@ function wpgmaps_tag_basic( $atts ) {
2419
  $wpgmza_api_key = get_option( 'wpgmza_google_maps_api_key' );
2420
 
2421
  if( $wpgmza_api_key ){
2422
- wp_enqueue_script('wpgmza_api_call', '//maps.google'.$wpgmza_suffix.'/maps/api/js?'.$api_version_string.'key='.$wpgmza_api_key.'&language='.$wpgmza_locale, array(), null );
2423
  } else {
2424
- wp_enqueue_script('wpgmza_api_call', '//maps.google'.$wpgmza_suffix.'/maps/api/js?'.$api_version_string.'language='.$wpgmza_locale, array(), null );
2425
  }
2426
 
2427
  $wpgaps_core_dependancy = array( 'wpgmza_api_call' );
@@ -2653,8 +2674,8 @@ function wpgmaps_sl_user_output_basic($map_id) {
2653
 
2654
 
2655
  $ret_msg .= " <input class=\"wpgmza_sl_search_button\" type=\"button\" onclick=\"searchLocations($map_id)\" value=\"".__("Search","wp-google-maps")."\"/>";
2656
- $ret_msg .= " <div class='wpgmza-not-found-msg js-not-found-msg'><p>" . $sl_not_found_message . "</p></div>";
2657
- $ret_msg .= " </div>";
2658
  $ret_msg .= " <div><select id=\"locationSelect\" style=\"width:100%;visibility:hidden\"></select></div>";
2659
 
2660
  return $ret_msg;
@@ -5456,7 +5477,7 @@ function wpgmaps_admin_scripts() {
5456
  */
5457
  }
5458
  function wpgmaps_user_styles() {
5459
- /*
5460
  if (!function_exists('wpgmaps_admin_styles_pro')) {
5461
  global $wpgmza_version;
5462
  global $short_code_active;
@@ -5465,7 +5486,7 @@ function wpgmaps_user_styles() {
5465
  wp_enqueue_style( 'wpgmaps-style' );
5466
  }
5467
  }
5468
- */
5469
  do_action("wpgooglemaps_hook_user_styles");
5470
 
5471
 
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: 6.4.05
7
  Author: WP Google Maps
8
  Author URI: https://www.wpgmaps.com
9
  Text Domain: wp-google-maps
12
 
13
  /*
14
  *
15
+ * 6.4.05 - 2017-06-13 - Medium priority
16
+ * Fixed the bug that caused JS errors to show up in the map editor
17
+ * Fixed a bug that caused the XML File option (for markers) to cause issues when trying to add a marker in the backend
18
+ * Allowed users to hide the subscribe feature in the plugins page
19
+ * New feature: Bulk delete markers
20
+ * Autocomplete now works when adding markers
21
+ * Autocomplete now works for the store locator on the front end
22
+ * Fixed a bug that caused the map to not load in the map editor for new installations
23
+ *
24
  * 6.4.04 - 2017-06-08 - Low priority
25
  * Tested on WordPress 4.8
26
+ * Refactored the admin JS code
27
  *
28
  * 6.4.03 - 2017-02-17 - Low priority
29
  * Added the ability for affiliates to make use of their affiliate IDs in the pro links
331
  $wpgmza_tblname_polylines = $wpdb->prefix . "wpgmza_polylines";
332
  $wpgmza_tblname_categories = $wpdb->prefix. "wpgmza_categories";
333
  $wpgmza_tblname_category_maps = $wpdb->prefix. "wpgmza_category_maps";
334
+ $wpgmza_version = "6.4.05";
335
  $wpgmza_p_version = "6.13";
336
  $wpgmza_t = "basic";
337
  define("WPGMAPS", $wpgmza_version);
661
  }
662
 
663
  add_action( 'wp_ajax_wpgmza_subscribe','wpgmza_ajax_subscribe');
664
+ add_action( 'wp_ajax_wpgmza_subscribe_hide','wpgmza_ajax_subscribe');
665
+
666
+
667
 
668
  function wpgmza_ajax_subscribe() {
669
  $check = check_ajax_referer( 'wpgmza_subscribe', 'security' );
673
  update_user_meta( $uid, 'wpgmza_subscribed', true);
674
 
675
  }
676
+
677
+ if ( $_POST['action'] == 'wpgmza_subscribe_hide' ) {
678
+ $uid = get_current_user_id();
679
+ update_user_meta( $uid, 'wpgmza_subscribed', true);
680
+ echo "1";
681
+ die();
682
+ }
683
  }
684
  }
685
 
706
  $check = get_user_meta(get_current_user_id(),"wpgmza_subscribed");
707
 
708
  if (!$check) {
709
+ $ret = '<div class="wpgmza_sub_div" style="margin-top:10px; color:#333; display:block; white-space:normal;">';
710
  $ret .= '<form>';
711
  $ret .= '<p><label for="wpgmza_signup_newsletter" style="font-style:italic; margin-bottom:5px;">' . __( 'Sign up to our newsletter and get information on the latest updates, beta versions and specials.', 'wp-google-maps' ) . '</label></p>';
712
  $ret .= '<span id="wpgmza_subscribe_div">';
713
  $ret .= '<input type="text" name="wpgmza_signup_newsletter" id="wpgmza_signup_newsletter" value="'.get_option( 'admin_email' ).'"></option>';
714
  $ret .= '<input type="button" class="button button-primary" id="wpgmza_signup_newsletter_btn" name="wpgmza_signup_newsletter_btn" value="' . __( 'Sign up', 'wp-google-maps' ) . '" />';
715
+ $ret .= '<input type="button" class="button button-secondary" id="wpgmza_signup_newsletter_hide" name="wpgmza_signup_newsletter_hide" value="' . __( 'Hide', 'wp-google-maps' ) . '" />';
716
  $ret .= '<span>';
717
  $ret .= '</form>';
718
  $ret .= '</div>';
1055
  }
1056
  $wpgmza_api_key = get_option( 'wpgmza_google_maps_api_key' );
1057
  if( $wpgmza_api_key ){
1058
+ wp_enqueue_script('wpgmza_api_call', '//maps.google'.$wpgmza_suffix.'/maps/api/js?'.$api_version_string.'key='.$wpgmza_api_key.'&language='.$wpgmza_locale."&libraries=places", array(), null );
1059
  } else {
1060
  /* use temp API key */
1061
  $wpgmza_temp_api_key = get_option('wpgmza_temp_api');
1062
+ wp_enqueue_script('wpgmza_api_call', '//maps.google'.$wpgmza_suffix.'/maps/api/js?'.$api_version_string.'key='.$wpgmza_temp_api_key.'&language='.$wpgmza_locale.'&libraries=places', array(), null );
1063
  }
1064
  $wpgaps_core_dependancy = array( 'wpgmza_api_call' );
1065
  }
2440
  $wpgmza_api_key = get_option( 'wpgmza_google_maps_api_key' );
2441
 
2442
  if( $wpgmza_api_key ){
2443
+ wp_enqueue_script('wpgmza_api_call', '//maps.google'.$wpgmza_suffix.'/maps/api/js?'.$api_version_string.'key='.$wpgmza_api_key.'&language='.$wpgmza_locale."&libraries=places", array(), null );
2444
  } else {
2445
+ wp_enqueue_script('wpgmza_api_call', '//maps.google'.$wpgmza_suffix.'/maps/api/js?'.$api_version_string.'language='.$wpgmza_locale."&libraries=places", array(), null );
2446
  }
2447
 
2448
  $wpgaps_core_dependancy = array( 'wpgmza_api_call' );
2674
 
2675
 
2676
  $ret_msg .= " <input class=\"wpgmza_sl_search_button\" type=\"button\" onclick=\"searchLocations($map_id)\" value=\"".__("Search","wp-google-maps")."\"/>";
2677
+ $ret_msg .= " <div class='wpgmza-not-found-msg js-not-found-msg'><p>" . $sl_not_found_message . "</p></div>";
2678
+ $ret_msg .= " </div>";
2679
  $ret_msg .= " <div><select id=\"locationSelect\" style=\"width:100%;visibility:hidden\"></select></div>";
2680
 
2681
  return $ret_msg;
5477
  */
5478
  }
5479
  function wpgmaps_user_styles() {
5480
+
5481
  if (!function_exists('wpgmaps_admin_styles_pro')) {
5482
  global $wpgmza_version;
5483
  global $short_code_active;
5486
  wp_enqueue_style( 'wpgmaps-style' );
5487
  }
5488
  }
5489
+
5490
  do_action("wpgooglemaps_hook_user_styles");
5491
 
5492