WP Google Maps - Version 6.3.07

Version Description

= 6.2.1 = Please update your WP Google Maps version to 6.2.1 to ensure you are using the latest security enhancements.

= 6.1.10 = Please update WP Google Maps to version 6.1.10 to enable our latest security enhancements.

= 6.1.5 = We no longer support timthumb and we have opted to remove it from WP Google Maps. Please update to 6.1.5 to ensure the removal of the timthumb script.

= 6.0.27 = Please upgrade your version of WP Google Maps to version 6.0.27 as it includes multiple security improvements.

Download this release

Release Info

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

Code changes from version 6.3.06 to 6.3.07

Files changed (2) hide show
  1. readme.txt +5 -1
  2. wpGoogleMaps.php +77 -17
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: WPGMaps, NickDuncan, CodeCabin_, Jarryd Long
3
  Donate link: http://www.wpgmaps.com
4
  Tags: google maps, maps, map, map markers, google, google map, google maps plugin, wp maps, wp google maps, wp google map, easy map, store locator, map plugin, directions, map directions, google map plugin, routes, polygons, polylines, streetview, location, marker, latitude, longitude, map widget, map themes
5
  Requires at least: 3.5
6
- Tested up to: 4.4.2
7
  Stable tag: trunk
8
  License: GPLv2
9
 
@@ -206,6 +206,10 @@ Please upgrade your version of WP Google Maps to version 6.0.27 as it includes m
206
 
207
  == Changelog ==
208
 
 
 
 
 
209
  = 6.3.06 - 2016-04-04 - Low priority =
210
  * Indonesian Translation added - Thank you Neno
211
  * Swedish Translation added - Thank you Martin Sleipner
3
  Donate link: http://www.wpgmaps.com
4
  Tags: google maps, maps, map, map markers, google, google map, google maps plugin, wp maps, wp google maps, wp google map, easy map, store locator, map plugin, directions, map directions, google map plugin, routes, polygons, polylines, streetview, location, marker, latitude, longitude, map widget, map themes
5
  Requires at least: 3.5
6
+ Tested up to: 4.5
7
  Stable tag: trunk
8
  License: GPLv2
9
 
206
 
207
  == Changelog ==
208
 
209
+ = 6.0.07 - 2016-04-13 - Low Priority =
210
+ * Tested on WordPress 4.5
211
+ * You can now use your own Google Maps API key for your maps
212
+
213
  = 6.3.06 - 2016-04-04 - Low priority =
214
  * Indonesian Translation added - Thank you Neno
215
  * Swedish Translation added - Thank you Martin Sleipner
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.06
7
  Author: WP Google Maps
8
  Author URI: http://www.wpgmaps.com
9
  Text Domain: wp-google-maps
@@ -11,6 +11,10 @@ Domain Path: /languages
11
  */
12
 
13
  /*
 
 
 
 
14
  * 6.3.06 - 2016-04-04 - Low Priority
15
  * Indonesian Translation added - Thank you Neno
16
  * Swedish Translation added - Thank you Martin Sleipner
@@ -216,7 +220,7 @@ $wpgmza_tblname_poly = $wpdb->prefix . "wpgmza_polygon";
216
  $wpgmza_tblname_polylines = $wpdb->prefix . "wpgmza_polylines";
217
  $wpgmza_tblname_categories = $wpdb->prefix. "wpgmza_categories";
218
  $wpgmza_tblname_category_maps = $wpdb->prefix. "wpgmza_category_maps";
219
- $wpgmza_version = "6.3.05";
220
  $wpgmza_p_version = "6.3.05";
221
  $wpgmza_t = "basic";
222
  define("WPGMAPS", $wpgmza_version);
@@ -634,10 +638,18 @@ function wpgmaps_admin_edit_marker_javascript() {
634
  $api_version_string = "v=3.14&";
635
  }
636
  ?>
637
- <script type="text/javascript">
638
- var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
639
- document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>' type='text/javascript'%3E%3C/script%3E"));
640
- </script>
 
 
 
 
 
 
 
 
641
  <link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
642
  <link rel="stylesheet" type="text/css" media="all" href="<?php echo wpgmaps_get_plugin_url(); ?>/css/data_table.css" />
643
  <script type="text/javascript" src="<?php echo wpgmaps_get_plugin_url(); ?>/js/jquery.dataTables.min.js"></script>
@@ -790,12 +802,18 @@ function wpgmaps_admin_javascript_basic() {
790
 
791
  ?>
792
 
793
-
794
- <script type="text/javascript">
795
- var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
796
- 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"));
797
- </script>
798
-
 
 
 
 
 
 
799
 
800
  <link rel="stylesheet" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
801
 
@@ -1607,12 +1625,19 @@ function wpgmaps_user_javascript_basic() {
1607
 
1608
  ?>
1609
 
 
 
 
 
 
 
 
 
 
 
 
 
1610
 
1611
- <script type="text/javascript">
1612
- var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
1613
- 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"));
1614
- </script>
1615
-
1616
  <script type="text/javascript" >
1617
  var marker_pull = '<?php echo $marker_pull; ?>';
1618
  <?php if (isset($markers) && strlen($markers) > 0 && $markers != "[]"){ ?>var db_marker_array = JSON.stringify(<?php echo $markers; ?>);<?php } else { echo "var db_marker_array = '';"; } ?>
@@ -3339,6 +3364,9 @@ function wpgmaps_head() {
3339
  if (isset($_POST['wpgmza_access_level'])) { $wpgmza_data['wpgmza_settings_access_level'] = sanitize_text_field($_POST['wpgmza_access_level']); }
3340
  if (isset($_POST['wpgmza_settings_marker_pull'])) { $wpgmza_data['wpgmza_settings_marker_pull'] = sanitize_text_field($_POST['wpgmza_settings_marker_pull']); }
3341
  update_option('WPGMZA_OTHER_SETTINGS', $wpgmza_data);
 
 
 
3342
  echo "<div class='updated'>";
3343
  _e("Your settings have been saved.","wp-google-maps");
3344
  echo "</div>";
@@ -4132,6 +4160,38 @@ function wpgmaps_settings_page_basic() {
4132
 
4133
  $ret .= "<div id=\"tabs-4\">";
4134
  $ret .= " <h3>".__("Advanced Settings","wp-google-maps")."</h3>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4135
  $ret .= " <h4>".__("Marker Data Location","wp-google-maps")."</h4>";
4136
  $ret .= " <table class='form-table'>";
4137
  $ret .= " <tr>";
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.07
7
  Author: WP Google Maps
8
  Author URI: http://www.wpgmaps.com
9
  Text Domain: wp-google-maps
11
  */
12
 
13
  /*
14
+ * 6.0.07 - 2016-04-13 - Low Priority
15
+ * Tested on WordPress 4.5
16
+ * You can now use your own Google Maps API key for your maps
17
+ *
18
  * 6.3.06 - 2016-04-04 - Low Priority
19
  * Indonesian Translation added - Thank you Neno
20
  * Swedish Translation added - Thank you Martin Sleipner
220
  $wpgmza_tblname_polylines = $wpdb->prefix . "wpgmza_polylines";
221
  $wpgmza_tblname_categories = $wpdb->prefix. "wpgmza_categories";
222
  $wpgmza_tblname_category_maps = $wpdb->prefix. "wpgmza_category_maps";
223
+ $wpgmza_version = "6.3.07";
224
  $wpgmza_p_version = "6.3.05";
225
  $wpgmza_t = "basic";
226
  define("WPGMAPS", $wpgmza_version);
638
  $api_version_string = "v=3.14&";
639
  }
640
  ?>
641
+ <?php if( get_option( 'wpgmza_google_maps_api_key' ) ){ ?>
642
+ <script type="text/javascript">
643
+ var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
644
+ var wpgmza_api_key = '<?php echo get_option( 'wpgmza_google_maps_api_key' ); ?>';
645
+ 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"));
646
+ </script>
647
+ <?php } else { ?>
648
+ <script type="text/javascript">
649
+ var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
650
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>' type='text/javascript'%3E%3C/script%3E"));
651
+ </script>
652
+ <?php } ?>
653
  <link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
654
  <link rel="stylesheet" type="text/css" media="all" href="<?php echo wpgmaps_get_plugin_url(); ?>/css/data_table.css" />
655
  <script type="text/javascript" src="<?php echo wpgmaps_get_plugin_url(); ?>/js/jquery.dataTables.min.js"></script>
802
 
803
  ?>
804
 
805
+ <?php if( get_option( 'wpgmza_google_maps_api_key' ) ){ ?>
806
+ <script type="text/javascript">
807
+ var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
808
+ var wpgmza_api_key = '<?php echo get_option( 'wpgmza_google_maps_api_key' ); ?>';
809
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>key="+wpgmza_api_key+"&libraries=places' type='text/javascript'%3E%3C/script%3E"));
810
+ </script>
811
+ <?php } else { ?>
812
+ <script type="text/javascript">
813
+ var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
814
+ 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"));
815
+ </script>
816
+ <?php } ?>
817
 
818
  <link rel="stylesheet" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
819
 
1625
 
1626
  ?>
1627
 
1628
+ <?php if( get_option( 'wpgmza_google_maps_api_key' ) ){ ?>
1629
+ <script type="text/javascript">
1630
+ var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
1631
+ var wpgmza_api_key = '<?php echo get_option( 'wpgmza_google_maps_api_key' ); ?>';
1632
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>key="+wpgmza_api_key+"&libraries=places' type='text/javascript'%3E%3C/script%3E"));
1633
+ </script>
1634
+ <?php } else { ?>
1635
+ <script type="text/javascript">
1636
+ var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
1637
+ 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"));
1638
+ </script>
1639
+ <?php } ?>
1640
 
 
 
 
 
 
1641
  <script type="text/javascript" >
1642
  var marker_pull = '<?php echo $marker_pull; ?>';
1643
  <?php if (isset($markers) && strlen($markers) > 0 && $markers != "[]"){ ?>var db_marker_array = JSON.stringify(<?php echo $markers; ?>);<?php } else { echo "var db_marker_array = '';"; } ?>
3364
  if (isset($_POST['wpgmza_access_level'])) { $wpgmza_data['wpgmza_settings_access_level'] = sanitize_text_field($_POST['wpgmza_access_level']); }
3365
  if (isset($_POST['wpgmza_settings_marker_pull'])) { $wpgmza_data['wpgmza_settings_marker_pull'] = sanitize_text_field($_POST['wpgmza_settings_marker_pull']); }
3366
  update_option('WPGMZA_OTHER_SETTINGS', $wpgmza_data);
3367
+
3368
+ if( isset( $_POST['wpgmza_google_maps_api_key'] ) ){ update_option( 'wpgmza_google_maps_api_key', sanitize_text_field( $_POST['wpgmza_google_maps_api_key'] ) ); }
3369
+
3370
  echo "<div class='updated'>";
3371
  _e("Your settings have been saved.","wp-google-maps");
3372
  echo "</div>";
4160
 
4161
  $ret .= "<div id=\"tabs-4\">";
4162
  $ret .= " <h3>".__("Advanced Settings","wp-google-maps")."</h3>";
4163
+
4164
+ $ret .= " <h4>".__("Google Maps API Key","wp-google-maps")."</h4>";
4165
+
4166
+ $ret .= " <table class='form-table'>";
4167
+ $ret .= " <tr>";
4168
+ $ret .= " <td valign='top' width='200' style='vertical-align:top;'>".__('Google Maps API Key (optional)', 'wp-google-maps')."</td>";
4169
+ $ret .= " <td>";
4170
+ $ret .= " <input type='text' id='wpgmza_google_maps_api_key' name='wpgmza_google_maps_api_key' value='".get_option('wpgmza_google_maps_api_key')."' style='width: 400px;' />";
4171
+ $ret .= " </td>";
4172
+ $ret .= " </tr>";
4173
+ $ret .= " <p>".__("This API key can be obtained from the <a href='https://console.developers.google.com' target='_BLANK'>Google Developers Console</a>. Our <a href='http://www.wpgmaps.com/documentation/creating-a-google-maps-api-key/' target='_BLANK'>documentation</a> provides a full guide on how to obtain this. ","wp-google-maps")."</p>";
4174
+ $ret .= " <tr class='wpgmza_marker_dir_tr' $show_advanced_marker_tr>";
4175
+ $ret .= " <td width='200' valign='top' style='vertical-align:top;'>".__("Marker data XML directory","wp-google-maps").":</td>";
4176
+ $ret .= " <td>";
4177
+ $ret .= " <input id='wpgmza_marker_xml_location' name='wpgmza_marker_xml_location' value='".get_option("wpgmza_xml_location")."' class='regular-text code' /> $wpgmza_file_perms_check";
4178
+ $ret .= " <br />";
4179
+ $ret .= " <small>".__("You can use the following","wp-google-maps").": {wp_content_dir},{plugins_dir},{uploads_dir}<br /><br />";
4180
+ $ret .= " ".__("Currently using","wp-google-maps").": <strong><em>$marker_location</em></strong></small>";
4181
+ $ret .= " </td>";
4182
+ $ret .= " </tr>";
4183
+ $ret .= " <tr class='wpgmza_marker_url_tr' $show_advanced_marker_tr>";
4184
+ $ret .= " <td width='200' valign='top' style='vertical-align:top;'>".__("Marker data XML URL","wp-google-maps").":</td>";
4185
+ $ret .= " <td>";
4186
+ $ret .= " <input id='wpgmza_marker_xml_url' name='wpgmza_marker_xml_url' value='".get_option("wpgmza_xml_url")."' class='regular-text code' />";
4187
+ $ret .= " <br />";
4188
+ $ret .= " <br />";
4189
+ $ret .= " <small>".__("You can use the following","wp-google-maps").": {wp_content_url},{plugins_url},{uploads_url}<br /><br />";
4190
+ $ret .= " ".__("Currently using","wp-google-maps").": <strong><em>$marker_url</em></strong></small>";
4191
+ $ret .= " </td>";
4192
+ $ret .= " </tr>";
4193
+ $ret .= " </table>";
4194
+
4195
  $ret .= " <h4>".__("Marker Data Location","wp-google-maps")."</h4>";
4196
  $ret .= " <table class='form-table'>";
4197
  $ret .= " <tr>";