WP Google Maps - Version 6.3.16

Version Description

  • 2016-08-02 - Low priority =
  • API key is now used on the edit polyline page
  • Removed the resizing script that caused the map to flicker on mobile devices
  • Added additional tab support (tri-tabs-nav span)
  • Fixed a bug in the store locator country restriction list
Download this release

Release Info

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

Code changes from version 6.3.15 to 6.3.16

base/classes/widget_module.class.php CHANGED
@@ -69,7 +69,7 @@ function wpgmza_get_widget_select_field($selection) {
69
 
70
  if (function_exists('wpgmza_get_widget_select_field_pro')) { wpgmza_get_widget_select_field_pro(); return; }
71
 
72
- $results = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpgmza_tblname_maps WHERE `active` = 0 ORDER BY `id` DESC ") );
73
 
74
  foreach ( $results as $result ) {
75
  $sel = ( intval($selection) == $result->id ) ? "selected" : '';
69
 
70
  if (function_exists('wpgmza_get_widget_select_field_pro')) { wpgmza_get_widget_select_field_pro(); return; }
71
 
72
+ $results = $wpdb->get_results("SELECT * FROM $wpgmza_tblname_maps WHERE `active` = 0 ORDER BY `id` DESC ");
73
 
74
  foreach ( $results as $result ) {
75
  $sel = ( intval($selection) == $result->id ) ? "selected" : '';
base/includes/credits.php CHANGED
@@ -22,7 +22,7 @@ Nick Duncan</a>
22
  <span class="title"><?php _e("Founder &amp; Lead Developer","wp-google-maps"); ?></span>
23
  </li>
24
  </ul>
25
- <h3 class="wp-people-group"><?php _e("Contributers","wp-google-maps"); ?></h3>
26
  <ul class="wp-people-group " id="wp-people-group-core-developers">
27
  <li class="wp-person" id="wp-person-dylanauty">
28
  <a href="https://profiles.wordpress.org/dylanauty/" class="web"><img src="http://en.gravatar.com/userimage/99843032/c4b24cccc2f7bd5b23ed2d1d8b1638e4?s=60&amp;d=mm&amp;r=g" srcset="http://1.gravatar.com/avatar/76424a001dc6b3ebb4faca0c567800c4?s=120&amp;d=mm&amp;r=g 2x" class="gravatar" alt="">
@@ -58,4 +58,6 @@ Gerard Arall</a>
58
 
59
  <p class="clear"><?php _e("Want to see your name on this page?","wp-google-maps"); ?> <a href="https://github.com/CodeCabin/wp-google-maps/"><?php _e("Get involved on GitHub.","wp-google-maps"); ?></a></p>
60
 
 
 
61
  </div>
22
  <span class="title"><?php _e("Founder &amp; Lead Developer","wp-google-maps"); ?></span>
23
  </li>
24
  </ul>
25
+ <h3 class="wp-people-group"><?php _e("Contributors","wp-google-maps"); ?></h3>
26
  <ul class="wp-people-group " id="wp-people-group-core-developers">
27
  <li class="wp-person" id="wp-person-dylanauty">
28
  <a href="https://profiles.wordpress.org/dylanauty/" class="web"><img src="http://en.gravatar.com/userimage/99843032/c4b24cccc2f7bd5b23ed2d1d8b1638e4?s=60&amp;d=mm&amp;r=g" srcset="http://1.gravatar.com/avatar/76424a001dc6b3ebb4faca0c567800c4?s=120&amp;d=mm&amp;r=g 2x" class="gravatar" alt="">
58
 
59
  <p class="clear"><?php _e("Want to see your name on this page?","wp-google-maps"); ?> <a href="https://github.com/CodeCabin/wp-google-maps/"><?php _e("Get involved on GitHub.","wp-google-maps"); ?></a></p>
60
 
61
+ <a class="button-primary" style='padding:10px; height:inherit;' href="admin.php?page=wp-google-maps-menu&override=1"><?php echo __("OK! Let's start","wp-google-maps"); ?></a>
62
+
63
  </div>
base/includes/welcome.php CHANGED
@@ -3,7 +3,7 @@
3
 
4
  <h1><?php _e("Welcome to WP Google Maps version 6.3","wp-google-maps"); ?></h1>
5
 
6
- <div class="about-text"><?php _e("Thank you for updating! WP Google Maps version 6 helps you build amazing maps through a simple interface and powerful functionality along with world class support.","wp-google-maps"); ?></div>
7
 
8
  <div class="wpgmza-badge" style=''></div>
9
 
@@ -102,7 +102,7 @@
102
  </div>
103
  </div>
104
 
105
- <a class="button-primary" href="admin.php?page=wp-google-maps-menu&override=1"><?php echo __("OK! Let's start","wp-google-maps"); ?></a>
106
 
107
  </div>
108
  </div>
3
 
4
  <h1><?php _e("Welcome to WP Google Maps version 6.3","wp-google-maps"); ?></h1>
5
 
6
+ <div class="about-text"><?php _e("Build amazing maps through a simple interface and powerful functionality along with world class support.","wp-google-maps"); ?></div>
7
 
8
  <div class="wpgmza-badge" style=''></div>
9
 
102
  </div>
103
  </div>
104
 
105
+ <a class="button-primary" style='padding:10px; height:inherit;' href="admin.php?page=wp-google-maps-menu&override=1"><?php echo __("OK! Let's start","wp-google-maps"); ?></a>
106
 
107
  </div>
108
  </div>
base/includes/wp-google-maps-polylines.php CHANGED
@@ -409,10 +409,18 @@ function wpgmaps_b_admin_edit_polyline_javascript($mapid,$polyid) {
409
 
410
 
411
  ?>
412
- <script type="text/javascript">
413
- var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
414
- document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?sensor=false' type='text/javascript'%3E%3C/script%3E"));
415
- </script>
 
 
 
 
 
 
 
 
416
  <link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
417
  <script type="text/javascript" >
418
  // polygons variables
409
 
410
 
411
  ?>
412
+ <?php if( get_option( 'wpgmza_google_maps_api_key' ) ){ ?>
413
+ <script type="text/javascript">
414
+ var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
415
+ var wpgmza_api_key = '<?php echo get_option( 'wpgmza_google_maps_api_key' ); ?>';
416
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?key="+wpgmza_api_key+"&language=<?php echo get_locale(); ?>&libraries=places,visualization' type='text/javascript'%3E%3C/script%3E"));
417
+ </script>
418
+ <?php } else { ?>
419
+ <script type="text/javascript">
420
+ var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
421
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?language=<?php echo get_locale(); ?>&libraries=places,visualization' type='text/javascript'%3E%3C/script%3E"));
422
+ </script>
423
+ <?php } ?>
424
  <link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
425
  <script type="text/javascript" >
426
  // polygons variables
readme.txt CHANGED
@@ -213,6 +213,12 @@ Please upgrade your version of WP Google Maps to version 6.0.27 as it includes m
213
 
214
  == Changelog ==
215
 
 
 
 
 
 
 
216
  = 6.3.15 - 2016-07-31 - High priority =
217
  * Security patches
218
  * Code refactoring
213
 
214
  == Changelog ==
215
 
216
+ = 6.3.16 - 2016-08-02 - Low priority =
217
+ * API key is now used on the edit polyline page
218
+ * Removed the resizing script that caused the map to flicker on mobile devices
219
+ * Added additional tab support (tri-tabs-nav span)
220
+ * Fixed a bug in the store locator country restriction list
221
+
222
  = 6.3.15 - 2016-07-31 - High priority =
223
  * Security patches
224
  * Code refactoring
wpGoogleMaps.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Google Maps
4
  Plugin URI: http://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.3.15
7
  Author: WP Google Maps
8
  Author URI: http://www.wpgmaps.com
9
  Text Domain: wp-google-maps
@@ -11,11 +11,16 @@ Domain Path: /languages
11
  */
12
 
13
  /*
 
 
 
 
 
 
14
  * 6.3.15 - 2016-07-31 - High priority
15
  * Security patches
16
  * Code refactoring
17
  *
18
- *
19
  * 6.3.14 - 2016-07-13 - High priority
20
  * Many security patches - thank you Gerard Arall
21
  * Bug fix - trim whitespace before and api the Google Maps API key
@@ -257,7 +262,7 @@ $wpgmza_tblname_poly = $wpdb->prefix . "wpgmza_polygon";
257
  $wpgmza_tblname_polylines = $wpdb->prefix . "wpgmza_polylines";
258
  $wpgmza_tblname_categories = $wpdb->prefix. "wpgmza_categories";
259
  $wpgmza_tblname_category_maps = $wpdb->prefix. "wpgmza_category_maps";
260
- $wpgmza_version = "6.3.15";
261
  $wpgmza_p_version = "6.02";
262
  $wpgmza_t = "basic";
263
  define("WPGMAPS", $wpgmza_version);
@@ -344,7 +349,7 @@ function wpgmaps_activate() {
344
  "bicycle" => "2",
345
  "traffic" => "2",
346
  "dbox" => "1",
347
- "dbox_width" => "250",
348
  "default_to" => "",
349
  "listmarkers" => "0",
350
  "listmarkers_advanced" => "0",
@@ -1755,11 +1760,13 @@ function wpgmaps_user_javascript_basic() {
1755
  MYMAP.placeMarkers('<?php echo wpgmaps_get_marker_url($wpgmza_current_map_id); ?>?u='+UniqueCode,<?php echo $wpgmza_current_map_id; ?>,null,null,null);
1756
  });
1757
 
 
1758
  jQuery(window).resize(function() {
1759
  MYMAP.init('#wpgmza_map', myLatLng, <?php echo $start_zoom; ?>);
1760
  UniqueCode=Math.round(Math.random()*10000);
1761
  MYMAP.placeMarkers('<?php echo wpgmaps_get_marker_url($wpgmza_current_map_id); ?>?u='+UniqueCode,<?php echo $wpgmza_current_map_id; ?>,null,null,null);
1762
  });
 
1763
 
1764
  /* tab compatibility */
1765
 
@@ -1824,6 +1831,13 @@ function wpgmaps_user_javascript_basic() {
1824
  UniqueCode=Math.round(Math.random()*10000);
1825
  MYMAP.placeMarkers('<?php echo wpgmaps_get_marker_url($wpgmza_current_map_id); ?>?u='+UniqueCode,<?php echo $wpgmza_current_map_id; ?>,null,null,null);
1826
  });
 
 
 
 
 
 
 
1827
 
1828
 
1829
  /* compatibility for GDL tabs */
@@ -3866,6 +3880,7 @@ function wpgmaps_menu_layout() {
3866
  } else {
3867
  $res = wpgmza_get_map_data(sanitize_text_field($_GET['map_id']));
3868
  echo "<h2>".__("Delete your map","wp-google-maps")."</h2><p>".__("Are you sure you want to delete the map","wp-google-maps")." <strong>\"".$res->map_title."?\"</strong> <br /><a href='?page=wp-google-maps-menu&action=trash&map_id=".sanitize_text_field($_GET['map_id'])."&s=1'>".__("Yes","wp-google-maps")."</a> | <a href='?page=wp-google-maps-menu'>".__("No","wp-google-maps")."</a></p>";
 
3869
  }
3870
  }
3871
  if (isset($_GET['action']) && $_GET['action'] == "duplicate" && isset($_GET['map_id'])) {
@@ -6620,8 +6635,7 @@ function wpgmaps_usage_tracking_callback(){
6620
  }
6621
 
6622
  function wpgmza_return_country_tld_array(){
6623
-
6624
- $path = plugins_url().'/wp-google-maps/js/countries.json';
6625
 
6626
  $file = file_get_contents($path);
6627
 
@@ -6654,14 +6668,24 @@ function google_maps_api_key_warning(){
6654
  $video = "<a href='https://www.youtube.com/watch?v=OH98za14LNg' target='_BLANK'>".__('View the instruction video', 'wp-google-maps')."</a>";
6655
  $documentation = "<a href='http://www.wpgmaps.com/documentation/creating-a-google-maps-api-key/' target='_BLANK'>".__('Read the documentation', 'wp-google-maps')."</a>";
6656
  echo "<div class='error'><h1>".__('Important Notification', 'wp-google-maps')."</h1><p>";
6657
- $article = "<small><a href='https://googlegeodevelopers.blogspot.co.za/2016/06/building-for-scale-updates-to-google.html' target='_BLANK'>".__('You can read more about that here.', 'wp-google-maps')."</small></a>";
6658
- echo "<h2>".__('Before you begin please note that *ALL* Google Maps now require an API key to function.','wp-google-maps').' '.$article.'</h2>';
6659
- echo "<a target='_BLANK' href='https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend&keyType=CLIENT_SIDE&reusekey=true' class='button button-primary'>".__("Create an API key now (free)","wp-google-maps")."</a>";
6660
- echo "<p><h3>".__('Once created, simply paste your API key here and press save.','wp-google-maps')."</h3>";
 
 
 
 
 
 
 
 
 
 
 
 
 
6661
  echo sprintf( __('Need help? %s or %s.', 'wp-google-maps'), $video, $documentation )."</p>";
6662
- echo "<form method='POST'><label>".__("Google Maps JavaScript API Key: ","wp-google-maps")."</label><input type='text' name='wpgmza_google_maps_api_key' /><br />";
6663
- echo "<p><button type='submit' class='button button-primary' name='wpgmza_save_google_api_key_list'>".__('Save', 'wp-google-maps')."</button>";
6664
- echo "<br /><em>".__("Once saved, it may take up to 5 minutes for your map to display.","wp-google-maps")."</em></p></form>";
6665
  echo "</div>";
6666
  }
6667
  }
3
  Plugin Name: WP Google Maps
4
  Plugin URI: http://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.3.16
7
  Author: WP Google Maps
8
  Author URI: http://www.wpgmaps.com
9
  Text Domain: wp-google-maps
11
  */
12
 
13
  /*
14
+ * 6.3.16 - 2016-08-04 - Low priority
15
+ * API key is now used on the edit polyline page
16
+ * Removed the resizing script that caused the map to flicker on mobile devices
17
+ * Added additional tab support (tri-tabs-nav span)
18
+ * Fixed a bug in the store locator country restriction list
19
+ *
20
  * 6.3.15 - 2016-07-31 - High priority
21
  * Security patches
22
  * Code refactoring
23
  *
 
24
  * 6.3.14 - 2016-07-13 - High priority
25
  * Many security patches - thank you Gerard Arall
26
  * Bug fix - trim whitespace before and api the Google Maps API key
262
  $wpgmza_tblname_polylines = $wpdb->prefix . "wpgmza_polylines";
263
  $wpgmza_tblname_categories = $wpdb->prefix. "wpgmza_categories";
264
  $wpgmza_tblname_category_maps = $wpdb->prefix. "wpgmza_category_maps";
265
+ $wpgmza_version = "6.3.16";
266
  $wpgmza_p_version = "6.02";
267
  $wpgmza_t = "basic";
268
  define("WPGMAPS", $wpgmza_version);
349
  "bicycle" => "2",
350
  "traffic" => "2",
351
  "dbox" => "1",
352
+ "dbox_width" => "100",
353
  "default_to" => "",
354
  "listmarkers" => "0",
355
  "listmarkers_advanced" => "0",
1760
  MYMAP.placeMarkers('<?php echo wpgmaps_get_marker_url($wpgmza_current_map_id); ?>?u='+UniqueCode,<?php echo $wpgmza_current_map_id; ?>,null,null,null);
1761
  });
1762
 
1763
+ /* removed in 6.3.16
1764
  jQuery(window).resize(function() {
1765
  MYMAP.init('#wpgmza_map', myLatLng, <?php echo $start_zoom; ?>);
1766
  UniqueCode=Math.round(Math.random()*10000);
1767
  MYMAP.placeMarkers('<?php echo wpgmaps_get_marker_url($wpgmza_current_map_id); ?>?u='+UniqueCode,<?php echo $wpgmza_current_map_id; ?>,null,null,null);
1768
  });
1769
+ */
1770
 
1771
  /* tab compatibility */
1772
 
1831
  UniqueCode=Math.round(Math.random()*10000);
1832
  MYMAP.placeMarkers('<?php echo wpgmaps_get_marker_url($wpgmza_current_map_id); ?>?u='+UniqueCode,<?php echo $wpgmza_current_map_id; ?>,null,null,null);
1833
  });
1834
+ jQuery('body').on('click', '. tri-tabs-nav span', function (event, ui) {
1835
+ MYMAP.init('#wpgmza_map', myLatLng, <?php echo $start_zoom; ?>);
1836
+ UniqueCode=Math.round(Math.random()*10000);
1837
+ MYMAP.placeMarkers('<?php echo wpgmaps_get_marker_url($wpgmza_current_map_id); ?>?u='+UniqueCode,<?php echo $wpgmza_current_map_id; ?>,null,null,null);
1838
+ });
1839
+
1840
+
1841
 
1842
 
1843
  /* compatibility for GDL tabs */
3880
  } else {
3881
  $res = wpgmza_get_map_data(sanitize_text_field($_GET['map_id']));
3882
  echo "<h2>".__("Delete your map","wp-google-maps")."</h2><p>".__("Are you sure you want to delete the map","wp-google-maps")." <strong>\"".$res->map_title."?\"</strong> <br /><a href='?page=wp-google-maps-menu&action=trash&map_id=".sanitize_text_field($_GET['map_id'])."&s=1'>".__("Yes","wp-google-maps")."</a> | <a href='?page=wp-google-maps-menu'>".__("No","wp-google-maps")."</a></p>";
3883
+ return;
3884
  }
3885
  }
3886
  if (isset($_GET['action']) && $_GET['action'] == "duplicate" && isset($_GET['map_id'])) {
6635
  }
6636
 
6637
  function wpgmza_return_country_tld_array(){
6638
+ $path = plugin_dir_path(__FILE__).'js/countries.json';
 
6639
 
6640
  $file = file_get_contents($path);
6641
 
6668
  $video = "<a href='https://www.youtube.com/watch?v=OH98za14LNg' target='_BLANK'>".__('View the instruction video', 'wp-google-maps')."</a>";
6669
  $documentation = "<a href='http://www.wpgmaps.com/documentation/creating-a-google-maps-api-key/' target='_BLANK'>".__('Read the documentation', 'wp-google-maps')."</a>";
6670
  echo "<div class='error'><h1>".__('Important Notification', 'wp-google-maps')."</h1><p>";
6671
+ $article = "<a href='https://googlegeodevelopers.blogspot.co.za/2016/06/building-for-scale-updates-to-google.html' target='_BLANK'>".__('You can read more about that here.', 'wp-google-maps')."</a>";
6672
+ echo "<p><strong>".__('*ALL* Google Maps now require an API key to function.','wp-google-maps').'</strong> '.$article.'</p>';
6673
+
6674
+ echo "<p>".__("Before creating a map please follow these steps:","wp-google-maps")."";
6675
+ echo "<ol>";
6676
+ echo "<li>";
6677
+ echo " <a target='_BLANK' href='https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend&keyType=CLIENT_SIDE&reusekey=true' class=''>".__("Create an API key now (free)","wp-google-maps")."</a>";
6678
+ echo "</li>";
6679
+ echo "<li><form method='POST'>";
6680
+ echo __('Paste your API key here and press save:','wp-google-maps');
6681
+ echo " <input type='text' name='wpgmza_google_maps_api_key' style='width:350px;' placeholder='".__("paste your Google Maps JavaScript API Key here","wp-google-maps")."' /> <button type='submit' class='button button-primary' name='wpgmza_save_google_api_key_list'>".__('Save', 'wp-google-maps')."</button>";
6682
+ echo "</form>";
6683
+
6684
+ echo "</li>";
6685
+ echo "</ol>";
6686
+ echo "</p>";
6687
+ echo "<p><em>".__("Once saved, it may take up to 5 minutes for your map to display.","wp-google-maps")."</em></p>";
6688
  echo sprintf( __('Need help? %s or %s.', 'wp-google-maps'), $video, $documentation )."</p>";
 
 
 
6689
  echo "</div>";
6690
  }
6691
  }