WP Google Maps - Version 6.3.17

Version Description

  • 2016-08-07 - Medium priority =
  • Added a temporary Google Maps JavaScript API key for users so that the UX is not negatively affected on the user's first attempt at using the plugin.
  • Added a check to the front end to only display the map if there is an Google Maps JavaScript API key saved
  • Fixed bugs that caused PHP warnings within the store locator
  • UX improvements to the welcome page
  • Fixed a bug that caused a JS error as a result of the previous versions new tab support
Download this release

Release Info

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

Code changes from version 6.3.16 to 6.3.17

base/includes/welcome.php CHANGED
@@ -1,12 +1,16 @@
1
  <?php global $wpgmza_global_array; ?>
2
  <div class="wrap about-wrap">
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
 
 
 
 
 
10
  <h2 class="nav-tab-wrapper wp-clearfix">
11
  <a href="admin.php?page=wp-google-maps-menu&action=welcome_page" class="nav-tab nav-tab-active"><?php _e("Welcome","wp-google-maps"); ?></a>
12
  <a href="admin.php?page=wp-google-maps-menu&action=credits" class="nav-tab"><?php _e("Credits","wp-google-maps"); ?></a>
@@ -73,7 +77,7 @@
73
 
74
 
75
  </ul></p>
76
- <input type='submit' name='wpgmza_save_feedback' value='Submit'>
77
 
78
  </form>
79
  </div>
@@ -102,7 +106,7 @@
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>
1
  <?php global $wpgmza_global_array; ?>
2
  <div class="wrap about-wrap">
3
+ <p>&nbsp;</p>
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
 
10
+ <a class="button-primary" style='padding:5px; padding-right:15px; padding-left:15px; height:inherit;' href="admin.php?page=wp-google-maps-menu&override=1"><?php echo __("Skip intro and create a map","wp-google-maps"); ?></a>
11
+ <p>&nbsp;</p>
12
+
13
+
14
  <h2 class="nav-tab-wrapper wp-clearfix">
15
  <a href="admin.php?page=wp-google-maps-menu&action=welcome_page" class="nav-tab nav-tab-active"><?php _e("Welcome","wp-google-maps"); ?></a>
16
  <a href="admin.php?page=wp-google-maps-menu&action=credits" class="nav-tab"><?php _e("Credits","wp-google-maps"); ?></a>
77
 
78
 
79
  </ul></p>
80
+ <input class='button-primary' type='submit' name='wpgmza_save_feedback' value='<?php _e("Submit and create a map","wp-google-maps"); ?>'>
81
 
82
  </form>
83
  </div>
106
  </div>
107
  </div>
108
 
109
+ <a class="button-primary" style='padding:5px; padding-right:15px; padding-left:15px; height:inherit;' href="admin.php?page=wp-google-maps-menu&override=1"><?php echo __("OK! Let's start","wp-google-maps"); ?></a>
110
 
111
  </div>
112
  </div>
base/includes/wp-google-maps-polygons.php CHANGED
@@ -205,18 +205,25 @@ function wpgmaps_b_admin_add_poly_javascript($mapid) {
205
 
206
 
207
  $wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
 
 
 
 
 
 
208
 
209
  ?>
210
  <?php if( get_option( 'wpgmza_google_maps_api_key' ) ){ ?>
211
  <script type="text/javascript">
212
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
213
  var wpgmza_api_key = '<?php echo get_option( 'wpgmza_google_maps_api_key' ); ?>';
214
- 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"));
215
  </script>
216
  <?php } else { ?>
217
  <script type="text/javascript">
 
218
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
219
- 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"));
220
  </script>
221
  <?php } ?>
222
  <link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
@@ -407,18 +414,25 @@ function wpgmaps_b_admin_edit_poly_javascript($mapid,$polyid) {
407
 
408
 
409
  $wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
 
 
 
 
 
 
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' />
205
 
206
 
207
  $wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
208
+ $api_version = $wpgmza_settings['wpgmza_api_version'];
209
+ if (isset($api_version) && $api_version != "") {
210
+ $api_version_string = "v=$api_version&";
211
+ } else {
212
+ $api_version_string = "v=3.exp&";
213
+ }
214
 
215
  ?>
216
  <?php if( get_option( 'wpgmza_google_maps_api_key' ) ){ ?>
217
  <script type="text/javascript">
218
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
219
  var wpgmza_api_key = '<?php echo get_option( 'wpgmza_google_maps_api_key' ); ?>';
220
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>key="+wpgmza_api_key+"' type='text/javascript'%3E%3C/script%3E"));
221
  </script>
222
  <?php } else { ?>
223
  <script type="text/javascript">
224
+ var wpgmza_temp_api_key = "<?php echo get_option('wpgmza_temp_api'); ?>";
225
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
226
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>key="+wpgmza_temp_api_key+"&libraries=places' type='text/javascript'%3E%3C/script%3E"));
227
  </script>
228
  <?php } ?>
229
  <link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
414
 
415
 
416
  $wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
417
+ $api_version = $wpgmza_settings['wpgmza_api_version'];
418
+ if (isset($api_version) && $api_version != "") {
419
+ $api_version_string = "v=$api_version&";
420
+ } else {
421
+ $api_version_string = "v=3.exp&";
422
+ }
423
 
424
  ?>
425
  <?php if( get_option( 'wpgmza_google_maps_api_key' ) ){ ?>
426
  <script type="text/javascript">
427
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
428
  var wpgmza_api_key = '<?php echo get_option( 'wpgmza_google_maps_api_key' ); ?>';
429
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>key="+wpgmza_api_key+"' type='text/javascript'%3E%3C/script%3E"));
430
  </script>
431
  <?php } else { ?>
432
  <script type="text/javascript">
433
+ var wpgmza_temp_api_key = "<?php echo get_option('wpgmza_temp_api'); ?>";
434
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
435
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>key="+wpgmza_temp_api_key+"&libraries=places' type='text/javascript'%3E%3C/script%3E"));
436
  </script>
437
  <?php } ?>
438
  <link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
base/includes/wp-google-maps-polylines.php CHANGED
@@ -203,17 +203,24 @@ function wpgmaps_b_admin_add_polyline_javascript($mapid) {
203
 
204
  $wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
205
 
 
 
 
 
 
 
206
  ?>
207
  <?php if( get_option( 'wpgmza_google_maps_api_key' ) ){ ?>
208
  <script type="text/javascript">
209
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
210
  var wpgmza_api_key = '<?php echo get_option( 'wpgmza_google_maps_api_key' ); ?>';
211
- 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"));
212
  </script>
213
  <?php } else { ?>
214
  <script type="text/javascript">
 
215
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
216
- 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"));
217
  </script>
218
  <?php } ?>
219
  <link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
@@ -406,6 +413,12 @@ function wpgmaps_b_admin_edit_polyline_javascript($mapid,$polyid) {
406
  if (!$fillopacity) { $fillopacity = "0.5"; }
407
  $linecolor = "#".$linecolor;
408
 
 
 
 
 
 
 
409
 
410
 
411
  ?>
@@ -413,12 +426,13 @@ function wpgmaps_b_admin_edit_polyline_javascript($mapid,$polyid) {
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' />
203
 
204
  $wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
205
 
206
+ $api_version = $wpgmza_settings['wpgmza_api_version'];
207
+ if (isset($api_version) && $api_version != "") {
208
+ $api_version_string = "v=$api_version&";
209
+ } else {
210
+ $api_version_string = "v=3.exp&";
211
+ }
212
  ?>
213
  <?php if( get_option( 'wpgmza_google_maps_api_key' ) ){ ?>
214
  <script type="text/javascript">
215
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
216
  var wpgmza_api_key = '<?php echo get_option( 'wpgmza_google_maps_api_key' ); ?>';
217
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>key="+wpgmza_api_key+"' type='text/javascript'%3E%3C/script%3E"));
218
  </script>
219
  <?php } else { ?>
220
  <script type="text/javascript">
221
+ var wpgmza_temp_api_key = "<?php echo get_option('wpgmza_temp_api'); ?>";
222
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
223
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>key="+wpgmza_temp_api_key+"&libraries=places' type='text/javascript'%3E%3C/script%3E"));
224
  </script>
225
  <?php } ?>
226
  <link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
413
  if (!$fillopacity) { $fillopacity = "0.5"; }
414
  $linecolor = "#".$linecolor;
415
 
416
+ $api_version = $wpgmza_settings['wpgmza_api_version'];
417
+ if (isset($api_version) && $api_version != "") {
418
+ $api_version_string = "v=$api_version&";
419
+ } else {
420
+ $api_version_string = "v=3.exp&";
421
+ }
422
 
423
 
424
  ?>
426
  <script type="text/javascript">
427
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
428
  var wpgmza_api_key = '<?php echo get_option( 'wpgmza_google_maps_api_key' ); ?>';
429
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>key="+wpgmza_api_key+"' type='text/javascript'%3E%3C/script%3E"));
430
  </script>
431
  <?php } else { ?>
432
  <script type="text/javascript">
433
+ var wpgmza_temp_api_key = "<?php echo get_option('wpgmza_temp_api'); ?>";
434
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
435
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>key="+wpgmza_temp_api_key+"&libraries=places' type='text/javascript'%3E%3C/script%3E"));
436
  </script>
437
  <?php } ?>
438
  <link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
css/wp-google-maps-admin.css CHANGED
@@ -54,8 +54,8 @@
54
  background: #E8E8E8;
55
  padding-top: 10px;
56
  padding-bottom: 10px;
57
- padding-left: 25px;
58
- padding-right: 25px;
59
 
60
  transition: background 0.2s;
61
  -webkit-transition: background 0.2s;
54
  background: #E8E8E8;
55
  padding-top: 10px;
56
  padding-bottom: 10px;
57
+ padding-left: 15px;
58
+ padding-right: 15px;
59
 
60
  transition: background 0.2s;
61
  -webkit-transition: background 0.2s;
images/map-bg.jpg ADDED
Binary file
readme.txt CHANGED
@@ -213,6 +213,13 @@ Please upgrade your version of WP Google Maps to version 6.0.27 as it includes m
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
213
 
214
  == Changelog ==
215
 
216
+ = 6.3.17 - 2016-08-07 - Medium priority =
217
+ * Added a temporary Google Maps JavaScript API key for users so that the UX is not negatively affected on the user's first attempt at using the plugin.
218
+ * Added a check to the front end to only display the map if there is an Google Maps JavaScript API key saved
219
+ * Fixed bugs that caused PHP warnings within the store locator
220
+ * UX improvements to the welcome page
221
+ * Fixed a bug that caused a JS error as a result of the previous versions new tab support
222
+
223
  = 6.3.16 - 2016-08-02 - Low priority =
224
  * API key is now used on the edit polyline page
225
  * Removed the resizing script that caused the map to flicker on mobile devices
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.16
7
  Author: WP Google Maps
8
  Author URI: http://www.wpgmaps.com
9
  Text Domain: wp-google-maps
@@ -11,7 +11,14 @@ Domain Path: /languages
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)
@@ -262,7 +269,7 @@ $wpgmza_tblname_poly = $wpdb->prefix . "wpgmza_polygon";
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);
@@ -306,6 +313,9 @@ function wpgmaps_activate() {
306
  $table_name_maps = $wpdb->prefix . "wpgmza_maps";
307
  delete_option("WPGMZA");
308
 
 
 
 
309
 
310
  /* set defaults for the Marker XML Dir and Marker XML URL */
311
  if (get_option("wpgmza_xml_location") == "") {
@@ -698,8 +708,9 @@ function wpgmaps_admin_edit_marker_javascript() {
698
  </script>
699
  <?php } else { ?>
700
  <script type="text/javascript">
701
- var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
702
- document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>' type='text/javascript'%3E%3C/script%3E"));
 
703
  </script>
704
  <?php } ?>
705
  <link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
@@ -871,8 +882,9 @@ function wpgmaps_admin_javascript_basic() {
871
  </script>
872
  <?php } else { ?>
873
  <script type="text/javascript">
 
874
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
875
- document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>&libraries=places' type='text/javascript'%3E%3C/script%3E"));
876
  </script>
877
  <?php } ?>
878
 
@@ -1831,7 +1843,7 @@ function wpgmaps_user_javascript_basic() {
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);
@@ -2912,6 +2924,21 @@ function wpgmaps_tag_basic( $atts ) {
2912
 
2913
  $res = wpgmza_get_map_data($atts['id']);
2914
  if (!isset($res)) { echo __("Error: The map ID","wp-google-maps")." (".$wpgmza_current_map_id.") ".__("does not exist","wp-google-maps"); return; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2915
  $short_code_active = true;
2916
 
2917
  if (!function_exists('wpgmaps_admin_styles_pro')) {
@@ -3026,7 +3053,8 @@ function wpgmaps_sl_user_output_basic($map_id) {
3026
  $ret_msg .= " <select class=\"wpgmza_sl_radius_select\" id=\"radiusSelect\">";
3027
  $ret_msg .= " ";
3028
 
3029
- if ($map_other_settings['store_locator_distance'] == 1) {
 
3030
  $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"1\">".__("1mi","wp-google-maps")."</option>";
3031
  $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"5\">".__("5mi","wp-google-maps")."</option>";
3032
  $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"10\" selected>".__("10mi","wp-google-maps")."</option>";
@@ -3868,8 +3896,10 @@ function wpgmaps_menu_layout() {
3868
  if (!isset($_GET['action'])) {
3869
  wpgmza_map_page();
3870
  } else {
3871
- echo"<br /><div class='wpgmza-support-notice' style='float:right; display:block; width:250px; height:65px; padding:6px; text-align:center; background-color: white; border-top: 4px solid #0073AA; margin-right:17px;'><strong>".__("Experiencing problems with the plugin?","wp-google-maps")."</strong><br /><a href='http://www.wpgmaps.com/documentation/troubleshooting/' title='WP Google Maps Troubleshooting Section' target='_BLANK'>".__("See the troubleshooting manual.","wp-google-maps")."</a> <br />".__("Or ask a question on our ","wp-google-maps")." <a href='http://www.wpgmaps.com/forums/forum/support-forum/' title='WP Google Maps Support Forum' target='_BLANK'>".__("Support forum.","wp-google-maps")."</a></div>";
3872
 
 
 
 
3873
  if ($_GET['action'] == "trash" && isset($_GET['map_id'])) {
3874
  if (isset( $_GET['s'] ) && $_GET['s'] == "1") {
3875
  if (wpgmaps_trash_map(sanitize_text_field($_GET['map_id']))) {
@@ -6057,6 +6087,7 @@ function wpgmaps_permission_warning() {
6057
  function wpgmaps_update_db_check() {
6058
  global $wpgmza_version;
6059
  if (get_option('wpgmza_db_version') != $wpgmza_version) {
 
6060
  wpgmaps_handle_db();
6061
  }
6062
 
@@ -6684,7 +6715,7 @@ function google_maps_api_key_warning(){
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
  }
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.17
7
  Author: WP Google Maps
8
  Author URI: http://www.wpgmaps.com
9
  Text Domain: wp-google-maps
11
  */
12
 
13
  /*
14
+ * 6.3.17 - 2016-08-07 - Medium priority
15
+ * Added a temporary Google Maps JavaScript API key for users so that the UX is not negatively affected on the user's first attempt at using the plugin.
16
+ * Added a check to the front end to only display the map if there is an Google Maps JavaScript API key saved
17
+ * Fixed bugs that caused PHP warnings within the store locator
18
+ * UX improvements to the welcome page
19
+ * Fixed a bug that caused a JS error as a result of the previous versions new tab support
20
+ *
21
+ * 6.3.16 - 2016-08-02 - Low priority
22
  * API key is now used on the edit polyline page
23
  * Removed the resizing script that caused the map to flicker on mobile devices
24
  * Added additional tab support (tri-tabs-nav span)
269
  $wpgmza_tblname_polylines = $wpdb->prefix . "wpgmza_polylines";
270
  $wpgmza_tblname_categories = $wpdb->prefix. "wpgmza_categories";
271
  $wpgmza_tblname_category_maps = $wpdb->prefix. "wpgmza_category_maps";
272
+ $wpgmza_version = "6.3.17";
273
  $wpgmza_p_version = "6.02";
274
  $wpgmza_t = "basic";
275
  define("WPGMAPS", $wpgmza_version);
313
  $table_name_maps = $wpdb->prefix . "wpgmza_maps";
314
  delete_option("WPGMZA");
315
 
316
+
317
+ update_option("wpgmza_temp_api",'AIzaSyChPphumyabdfggISDNBuGOlGVBgEvZnGE');
318
+
319
 
320
  /* set defaults for the Marker XML Dir and Marker XML URL */
321
  if (get_option("wpgmza_xml_location") == "") {
708
  </script>
709
  <?php } else { ?>
710
  <script type="text/javascript">
711
+ var wpgmza_temp_api_key = "<?php echo get_option('wpgmza_temp_api'); ?>";
712
+ var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
713
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>key="+wpgmza_temp_api_key+"&libraries=places' type='text/javascript'%3E%3C/script%3E"));
714
  </script>
715
  <?php } ?>
716
  <link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
882
  </script>
883
  <?php } else { ?>
884
  <script type="text/javascript">
885
+ var wpgmza_temp_api_key = "<?php echo get_option('wpgmza_temp_api'); ?>";
886
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
887
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>key="+wpgmza_temp_api_key+"&libraries=places' type='text/javascript'%3E%3C/script%3E"));
888
  </script>
889
  <?php } ?>
890
 
1843
  UniqueCode=Math.round(Math.random()*10000);
1844
  MYMAP.placeMarkers('<?php echo wpgmaps_get_marker_url($wpgmza_current_map_id); ?>?u='+UniqueCode,<?php echo $wpgmza_current_map_id; ?>,null,null,null);
1845
  });
1846
+ jQuery('body').on('click', '.tri-tabs-nav span', function (event, ui) {
1847
  MYMAP.init('#wpgmza_map', myLatLng, <?php echo $start_zoom; ?>);
1848
  UniqueCode=Math.round(Math.random()*10000);
1849
  MYMAP.placeMarkers('<?php echo wpgmaps_get_marker_url($wpgmza_current_map_id); ?>?u='+UniqueCode,<?php echo $wpgmza_current_map_id; ?>,null,null,null);
2924
 
2925
  $res = wpgmza_get_map_data($atts['id']);
2926
  if (!isset($res)) { echo __("Error: The map ID","wp-google-maps")." (".$wpgmza_current_map_id.") ".__("does not exist","wp-google-maps"); return; }
2927
+
2928
+ $user_api_key = get_option( 'wpgmza_google_maps_api_key' );
2929
+ if (!$user_api_key || $user_api_key == "") {
2930
+ $adminurl = admin_url( 'admin.php?page=wp-google-maps-menu-settings#tabs-4');
2931
+ $link = sprintf( __( "In order for your map to display, please make sure you insert your Google Maps JavaScript API key in the <a href='%s' target='_BLANK'>Maps->Settings->Advanced tab</a>.", 'wp-google-maps' ),
2932
+ $adminurl
2933
+ );
2934
+
2935
+ echo "<div class='wpgmza_error' style='background-image:url(".plugins_url('images/map-bg.jpg', __FILE__)."); display:block; padding:15px; border:1px solid #eee; overflow:auto;'>";
2936
+ echo "<h3>".__("WP Google Maps Error","wp-google-maps")."</h3>";
2937
+ echo "<p style='color:#333;'><strong>".$link."</strong></p>";
2938
+ echo "</div>";
2939
+ return;
2940
+ }
2941
+
2942
  $short_code_active = true;
2943
 
2944
  if (!function_exists('wpgmaps_admin_styles_pro')) {
3053
  $ret_msg .= " <select class=\"wpgmza_sl_radius_select\" id=\"radiusSelect\">";
3054
  $ret_msg .= " ";
3055
 
3056
+ $map_other_settings['store_locator_distance'] = isset($map_other_settings['wpgmza_store_locator_distance']) ? 1 : 2;
3057
+ if (isset($map_other_settings['store_locator_distance']) && $map_other_settings['store_locator_distance'] == 1) {
3058
  $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"1\">".__("1mi","wp-google-maps")."</option>";
3059
  $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"5\">".__("5mi","wp-google-maps")."</option>";
3060
  $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"10\" selected>".__("10mi","wp-google-maps")."</option>";
3896
  if (!isset($_GET['action'])) {
3897
  wpgmza_map_page();
3898
  } else {
 
3899
 
3900
+ if ($_GET['action'] == "welcome_page" || $_GET['action'] == "credits") { } else {
3901
+ echo"<br /><div class='wpgmza-support-notice' style='float:right; display:block; width:250px; height:65px; padding:6px; text-align:center; background-color: white; border-top: 4px solid #0073AA; margin-right:17px;'><strong>".__("Experiencing problems with the plugin?","wp-google-maps")."</strong><br /><a href='http://www.wpgmaps.com/documentation/troubleshooting/' title='WP Google Maps Troubleshooting Section' target='_BLANK'>".__("See the troubleshooting manual.","wp-google-maps")."</a> <br />".__("Or ask a question on our ","wp-google-maps")." <a href='http://www.wpgmaps.com/forums/forum/support-forum/' title='WP Google Maps Support Forum' target='_BLANK'>".__("Support forum.","wp-google-maps")."</a></div>";
3902
+ }
3903
  if ($_GET['action'] == "trash" && isset($_GET['map_id'])) {
3904
  if (isset( $_GET['s'] ) && $_GET['s'] == "1") {
3905
  if (wpgmaps_trash_map(sanitize_text_field($_GET['map_id']))) {
6087
  function wpgmaps_update_db_check() {
6088
  global $wpgmza_version;
6089
  if (get_option('wpgmza_db_version') != $wpgmza_version) {
6090
+ update_option("wpgmza_temp_api",'AIzaSyChPphumyabdfggISDNBuGOlGVBgEvZnGE');
6091
  wpgmaps_handle_db();
6092
  }
6093
 
6715
  echo "</li>";
6716
  echo "</ol>";
6717
  echo "</p>";
6718
+ echo "<p><em>".__("Please note that you are currently using a temporary API key which allows the maps in your back end to be displayed. For your map to be displayed on your website, you will need to follow the above steps.","wp-google-maps")."</em></p>";
6719
  echo sprintf( __('Need help? %s or %s.', 'wp-google-maps'), $video, $documentation )."</p>";
6720
  echo "</div>";
6721
  }