WP Google Map - Version 1.7.4

Version Description

  • media_buttons_context deprecated issue resolving
  • Review system modification, made standard
  • Code re-organize with trait system
  • Admin UI updated to more user friendly
  • In case of shortcode not found shown a custom message only for logged in admin user
  • According to plugin guide updated code and optimized
Download this release

Release Info

Developer milonfci
Plugin Icon 128x128 WP Google Map
Version 1.7.4
Comparing to
See all releases

Code changes from version 1.7.3 to 1.7.4

assets/images/logo_tags_1_7_4.jpg ADDED
Binary file
includes/shortcodes.php CHANGED
@@ -1,10 +1,15 @@
1
  <?php
2
- if (!defined('ABSPATH')) {
3
- exit;
4
- }
5
- // ************* WP Google Map Shortcode***************
6
  if (!function_exists('srm_gmap_embed_shortcode')) {
7
 
 
 
 
 
 
 
 
8
  function srm_gmap_embed_shortcode($atts, $content)
9
  {
10
  static $count;
@@ -44,7 +49,7 @@ if (!function_exists('srm_gmap_embed_shortcode')) {
44
  });
45
 
46
  // To view directions form and data
47
- <?php if($wpgmap_enable_direction and strlen(get_option('wpgmapembed_license')) == 32 ){ ?>
48
  var directionsDisplay = new google.maps.DirectionsRenderer();
49
 
50
  directionsDisplay.setMap(map);
@@ -98,7 +103,8 @@ if (!function_exists('srm_gmap_embed_shortcode')) {
98
  var infowindow = new google.maps.InfoWindow({
99
  content: "<?php echo html_entity_decode($wpgmap_map_address);?>"
100
  });
101
- infowindow.open(map, marker);
 
102
  google.maps.event.addListener(marker, 'click', function () {
103
  infowindow.open(map, marker);
104
  });
@@ -158,8 +164,10 @@ if (!function_exists('srm_gmap_embed_shortcode')) {
158
  style="width: 100%"/>
159
  </div>
160
  <div data-role="fieldcontain" class="fieldcontain">
161
- <label for="srm_gmap_mode_<?php echo $count;?>" class="select"><?php _e('Transportation method', 'gmap-embed') ?>:</label>
162
- <select name="select_choice_<?php echo $count;?>" id="srm_gmap_mode_<?php echo $count;?>" style="padding: 5px;width: 100%;">
 
 
163
  <option value="DRIVING"><?php _e('Driving', 'gmap-embed') ?></option>
164
  <option value="WALKING"><?php _e('Walking', 'gmap-embed') ?></option>
165
  <option value="BICYCLING"><?php _e('Bicycling', 'gmap-embed') ?></option>
@@ -182,8 +190,8 @@ if (!function_exists('srm_gmap_embed_shortcode')) {
182
  </div>
183
  <?php
184
  }
185
- }else{
186
- if( is_user_logged_in() and current_user_can( 'administrator' ) ){
187
  echo "<span style='color:darkred;'>Shortcode not defined, please check WP Google Map plugin in wordpress admin panel(sidebar). This message only visible to Administrator</span>";
188
  }
189
  }
1
  <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit;
3
+ // ************* WP Google Map Shortcode ***************
 
 
4
  if (!function_exists('srm_gmap_embed_shortcode')) {
5
 
6
+ /**
7
+ * Generate map based on shortcode input
8
+ * @param $atts
9
+ * @param $content
10
+ * @return string
11
+ * @since 1.0.0
12
+ */
13
  function srm_gmap_embed_shortcode($atts, $content)
14
  {
15
  static $count;
49
  });
50
 
51
  // To view directions form and data
52
+ <?php if($wpgmap_enable_direction and gmap_embed_is_using_premium_version() ){ ?>
53
  var directionsDisplay = new google.maps.DirectionsRenderer();
54
 
55
  directionsDisplay.setMap(map);
103
  var infowindow = new google.maps.InfoWindow({
104
  content: "<?php echo html_entity_decode($wpgmap_map_address);?>"
105
  });
106
+ // infowindow.open(map, marker);
107
+ infowindow.open({anchor: marker, shouldFocus: false});
108
  google.maps.event.addListener(marker, 'click', function () {
109
  infowindow.open(map, marker);
110
  });
164
  style="width: 100%"/>
165
  </div>
166
  <div data-role="fieldcontain" class="fieldcontain">
167
+ <label for="srm_gmap_mode_<?php echo $count; ?>"
168
+ class="select"><?php _e('Transportation method', 'gmap-embed') ?>:</label>
169
+ <select name="select_choice_<?php echo $count; ?>" id="srm_gmap_mode_<?php echo $count; ?>"
170
+ style="padding: 5px;width: 100%;">
171
  <option value="DRIVING"><?php _e('Driving', 'gmap-embed') ?></option>
172
  <option value="WALKING"><?php _e('Walking', 'gmap-embed') ?></option>
173
  <option value="BICYCLING"><?php _e('Bicycling', 'gmap-embed') ?></option>
190
  </div>
191
  <?php
192
  }
193
+ } else {
194
+ if (is_user_logged_in() and current_user_can('administrator')) {
195
  echo "<span style='color:darkred;'>Shortcode not defined, please check WP Google Map plugin in wordpress admin panel(sidebar). This message only visible to Administrator</span>";
196
  }
197
  }
readme.txt CHANGED
@@ -1,11 +1,11 @@
1
- === GmapEmbed - Google Maps plugin for WordPress ===
2
  Contributors: milonfci
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZBERRKARGNEYA
4
  Tags: google map, map, maps, google maps, map markers, google map plugin, google map embed, google maps plugin, wp google map, map plugin, map embed, best google maps, store locator, map direction, map widget, street view
5
  Requires at least: 2.9
6
  Tested up to: 5.7
7
- Version: 1.7.3
8
- Stable tag: 1.7.3
9
  Requires PHP: 5.3
10
  Text Domain: gmap-embed
11
  License: GPLv2 or later
@@ -183,6 +183,14 @@ See the [Video](https://www.youtube.com/watch?v=o90H34eacHg) ,hope you will get
183
 
184
  == Changelog ==
185
 
 
 
 
 
 
 
 
 
186
  = 1.7.3 =
187
  * Custom CSS and JS adding option under settings tab.
188
  * Map direction UI re-designed and made responsive for various themes.
1
+ === Maps Plugin using Google Maps for WordPress - WP Google Map ===
2
  Contributors: milonfci
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZBERRKARGNEYA
4
  Tags: google map, map, maps, google maps, map markers, google map plugin, google map embed, google maps plugin, wp google map, map plugin, map embed, best google maps, store locator, map direction, map widget, street view
5
  Requires at least: 2.9
6
  Tested up to: 5.7
7
+ Version: 1.7.4
8
+ Stable tag: 1.7.4
9
  Requires PHP: 5.3
10
  Text Domain: gmap-embed
11
  License: GPLv2 or later
183
 
184
  == Changelog ==
185
 
186
+ = 1.7.4 =
187
+ * media_buttons_context deprecated issue resolving
188
+ * Review system modification, made standard
189
+ * Code re-organize with trait system
190
+ * Admin UI updated to more user friendly
191
+ * In case of shortcode not found shown a custom message only for logged in admin user
192
+ * According to plugin guide updated code and optimized
193
+
194
  = 1.7.3 =
195
  * Custom CSS and JS adding option under settings tab.
196
  * Map direction UI re-designed and made responsive for various themes.
srm_gmap_embed.php CHANGED
@@ -7,7 +7,7 @@
7
  Text Domain: gmap-embed
8
  Domain Path: /languages
9
  Author URI: https://www.srmilon.info?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
10
- Version: 1.7.3
11
  */
12
 
13
  if (!defined('ABSPATH')) {
7
  Text Domain: gmap-embed
8
  Domain Path: /languages
9
  Author URI: https://www.srmilon.info?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
10
+ Version: 1.7.4
11
  */
12
 
13
  if (!defined('ABSPATH')) {