Google Maps Widget – Ultimate Google Maps Plugin - Version 2.75

Version Description

  • 2015/10/26
  • minor JS tweaks and bug fixes
Download this release

Release Info

Developer WebFactory
Plugin Icon 128x128 Google Maps Widget – Ultimate Google Maps Plugin
Version 2.75
Comparing to
See all releases

Code changes from version 2.70 to 2.75

gmw-tracking.php CHANGED
@@ -47,7 +47,7 @@ class GMW_tracking {
47
 
48
  if (isset($options['allow_tracking']) && $options['allow_tracking'] === true) {
49
  if (!wp_next_scheduled(GMW_CRON)) {
50
- wp_schedule_event(time() + 300, 'gmw_biweekly', GMW_CRON);
51
  }
52
  } else {
53
  self::clear_cron();
47
 
48
  if (isset($options['allow_tracking']) && $options['allow_tracking'] === true) {
49
  if (!wp_next_scheduled(GMW_CRON)) {
50
+ wp_schedule_event(time() + 30, 'gmw_biweekly', GMW_CRON);
51
  }
52
  } else {
53
  self::clear_cron();
gmw-widget.php CHANGED
@@ -124,8 +124,8 @@ class GoogleMapsWidget extends WP_Widget {
124
  array('val' => 'noimage-rounded', 'label' => __('Rounded', 'google-maps-widget')));
125
  }
126
 
127
- echo '<p><label for="' . $this->get_field_id('title') . '">' . __('Title', 'google-maps-widget') . ':</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
128
- echo '<p><label for="' . $this->get_field_id('address') . '">' . __('Address', 'google-maps-widget') . ':</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" required /></p>';
129
 
130
  echo '<div class="gmw-tabs" id="tab-' . $this->id . '"><ul><li><a href="#gmw-thumb">' . __('Thumbnail map', 'google-maps-widget') . '</a></li><li><a href="#gmw-lightbox">' . __('Lightbox map', 'google-maps-widget') . '</a></li><li><a href="#gmw-shortcode">' . __('Shortcode', 'google-maps-widget') . '</a></li><li><a href="#gmw-info">' . __('Info &amp; Support', 'google-maps-widget') . '</a></li></ul>';
131
  echo '<div id="gmw-thumb">';
@@ -156,7 +156,7 @@ class GoogleMapsWidget extends WP_Widget {
156
  echo '</select></p>';
157
 
158
  echo '<p class="gmw_thumb_pin_type_custom_section"><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_img') . '">' . __('Pin Image URL', 'google-maps-widget') . ':</label>';
159
- echo '<input type="text" class="regular-text" id="' . $this->get_field_id('thumb_pin_img') . '" name="' . $this->get_field_name('thumb_pin_img') . '" value="' . esc_attr($thumb_pin_img) . '">';
160
 
161
  echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_zoom') . '">' . __('Zoom Level', 'google-maps-widget') . ':</label>';
162
  echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
@@ -169,7 +169,7 @@ class GoogleMapsWidget extends WP_Widget {
169
  echo '</select></p>';
170
 
171
  echo '<p class="gmw_thumb_link_section"><label class="gmw-label" for="' . $this->get_field_id('thumb_link') . '">' . __('Custom URL', 'google-maps-widget') . ':</label>';
172
- echo '<input class="regular-text" id="' . $this->get_field_id('thumb_link') . '" name="' . $this->get_field_name('thumb_link') . '" type="url" value="' . esc_attr($thumb_link) . '" /></p>';
173
 
174
  echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_color_scheme') . '">' . __('Color Scheme', 'google-maps-widget') . ':</label>';
175
  echo '<select class="gmw_thumb_color_scheme" id="' . $this->get_field_id('thumb_color_scheme') . '" name="' . $this->get_field_name('thumb_color_scheme') . '">';
124
  array('val' => 'noimage-rounded', 'label' => __('Rounded', 'google-maps-widget')));
125
  }
126
 
127
+ echo '<p><label for="' . $this->get_field_id('title') . '">' . __('Title', 'google-maps-widget') . ':</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" placeholder="Map title" type="text" value="' . esc_attr($title) . '" /></p>';
128
+ echo '<p><label for="' . $this->get_field_id('address') . '">' . __('Address', 'google-maps-widget') . ':</label><input class="widefat" id="' . $this->get_field_id('address') . '" placeholder="Address to show" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" required /></p>';
129
 
130
  echo '<div class="gmw-tabs" id="tab-' . $this->id . '"><ul><li><a href="#gmw-thumb">' . __('Thumbnail map', 'google-maps-widget') . '</a></li><li><a href="#gmw-lightbox">' . __('Lightbox map', 'google-maps-widget') . '</a></li><li><a href="#gmw-shortcode">' . __('Shortcode', 'google-maps-widget') . '</a></li><li><a href="#gmw-info">' . __('Info &amp; Support', 'google-maps-widget') . '</a></li></ul>';
131
  echo '<div id="gmw-thumb">';
156
  echo '</select></p>';
157
 
158
  echo '<p class="gmw_thumb_pin_type_custom_section"><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_img') . '">' . __('Pin Image URL', 'google-maps-widget') . ':</label>';
159
+ echo '<input type="url" placeholder="http://" class="regular-text" id="' . $this->get_field_id('thumb_pin_img') . '" name="' . $this->get_field_name('thumb_pin_img') . '" value="' . esc_attr($thumb_pin_img) . '" required />';
160
 
161
  echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_zoom') . '">' . __('Zoom Level', 'google-maps-widget') . ':</label>';
162
  echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
169
  echo '</select></p>';
170
 
171
  echo '<p class="gmw_thumb_link_section"><label class="gmw-label" for="' . $this->get_field_id('thumb_link') . '">' . __('Custom URL', 'google-maps-widget') . ':</label>';
172
+ echo '<input class="regular-text" placeholder="http://" id="' . $this->get_field_id('thumb_link') . '" name="' . $this->get_field_name('thumb_link') . '" type="url" value="' . esc_attr($thumb_link) . '" required /></p>';
173
 
174
  echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_color_scheme') . '">' . __('Color Scheme', 'google-maps-widget') . ':</label>';
175
  echo '<select class="gmw_thumb_color_scheme" id="' . $this->get_field_id('thumb_color_scheme') . '" name="' . $this->get_field_name('thumb_color_scheme') . '">';
google-maps-widget.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google Maps Widget
4
  Plugin URI: http://www.googlemapswidget.com/
5
  Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox. Includes shortcode support and numerous options.
6
  Author: Web factory Ltd
7
- Version: 2.70
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: google-maps-widget
10
  Domain Path: lang
@@ -40,7 +40,7 @@ require_once 'gmw-tracking.php';
40
 
41
 
42
  class GMW {
43
- static $version = '2.70';
44
 
45
  // hook everything up
46
  static function init() {
@@ -247,10 +247,12 @@ class GMW {
247
  GMW_tracking::count_active_widgets() > 0 &&
248
  (current_time('timestamp') - $options['first_install']) > (DAY_IN_SECONDS * 3)) {
249
  add_action('admin_notices', array(__CLASS__, 'notice_rate_plugin'));
 
250
  } // show rate notice
251
 
252
- if (!$notice && !isset($options['allow_tracking']) && ((current_time('timestamp') - $options['first_install']) > (DAY_IN_SECONDS * 7))) {
253
  add_action('admin_notices', array('GMW_tracking', 'tracking_notice'));
 
254
  } // show tracking notice
255
  } // add_notices
256
 
4
  Plugin URI: http://www.googlemapswidget.com/
5
  Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox. Includes shortcode support and numerous options.
6
  Author: Web factory Ltd
7
+ Version: 2.75
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: google-maps-widget
10
  Domain Path: lang
40
 
41
 
42
  class GMW {
43
+ static $version = '2.75';
44
 
45
  // hook everything up
46
  static function init() {
247
  GMW_tracking::count_active_widgets() > 0 &&
248
  (current_time('timestamp') - $options['first_install']) > (DAY_IN_SECONDS * 3)) {
249
  add_action('admin_notices', array(__CLASS__, 'notice_rate_plugin'));
250
+ $notice = true;
251
  } // show rate notice
252
 
253
+ if (!$notice && !isset($options['allow_tracking']) && ((current_time('timestamp') - $options['first_install']) > (DAY_IN_SECONDS * 5))) {
254
  add_action('admin_notices', array('GMW_tracking', 'tracking_notice'));
255
+ $notice = true;
256
  } // show tracking notice
257
  } // add_notices
258
 
js/gmw-admin.js CHANGED
@@ -21,16 +21,13 @@ jQuery(function($) {
21
 
22
  // init JS UI for an individual GMW
23
  function gmw_init_widget_ui(widget) {
24
- gmw_change_pin_type(widget);
25
- gmw_change_link_type(widget);
26
-
27
  // handle dropdown fields that have dependant fields
28
  $('.gmw_thumb_pin_type', widget).on('change', function(e) {
29
  gmw_change_pin_type(widget);
30
- });
31
  $('.gmw_thumb_link_type', widget).on('change', function(e) {
32
  gmw_change_link_type(widget);
33
- });
34
  $('.gmw_thumb_color_scheme', widget).on('change', function(e) {
35
  gmw_promo_option_change(widget, '.gmw_thumb_color_scheme');
36
  });
@@ -147,7 +144,12 @@ jQuery(function($) {
147
  return false;
148
  }
149
 
150
- $.post(ajaxurl, { action: 'gmw_subscribe', 'name': $('#gmw_name').val(), 'email': $('#gmw_email').val()}, function(data) {
 
 
 
 
 
151
  if (data && data.success == true) {
152
  $('#gmw_dialog_subscribe').hide();
153
  $('#gmw_dialog_activate').show();
21
 
22
  // init JS UI for an individual GMW
23
  function gmw_init_widget_ui(widget) {
 
 
 
24
  // handle dropdown fields that have dependant fields
25
  $('.gmw_thumb_pin_type', widget).on('change', function(e) {
26
  gmw_change_pin_type(widget);
27
+ }).trigger('change');
28
  $('.gmw_thumb_link_type', widget).on('change', function(e) {
29
  gmw_change_link_type(widget);
30
+ }).trigger('change');
31
  $('.gmw_thumb_color_scheme', widget).on('change', function(e) {
32
  gmw_promo_option_change(widget, '.gmw_thumb_color_scheme');
33
  });
144
  return false;
145
  }
146
 
147
+ $.post(ajaxurl,
148
+ { 'action': 'gmw_subscribe',
149
+ 'name': $('#gmw_name').val(),
150
+ 'email': $('#gmw_email').val()
151
+ },
152
+ function(data) {
153
  if (data && data.success == true) {
154
  $('#gmw_dialog_subscribe').hide();
155
  $('#gmw_dialog_activate').show();
readme.txt CHANGED
@@ -6,7 +6,7 @@ License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: 3.3
8
  Tested up to: 4.3
9
- Stable tag: 2.70
10
 
11
  Displays a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
12
 
@@ -121,6 +121,10 @@ If you can't figure it out open a thread in the support forums.
121
  6. Widget options - info & support
122
 
123
  == Changelog ==
 
 
 
 
124
  = 2.70 =
125
  * 2015/10/12
126
  * fixed a nasty bug with shortcode rendering (thanks Hey You!)
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: 3.3
8
  Tested up to: 4.3
9
+ Stable tag: 2.75
10
 
11
  Displays a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
12
 
121
  6. Widget options - info & support
122
 
123
  == Changelog ==
124
+ = 2.75 =
125
+ * 2015/10/26
126
+ * minor JS tweaks and bug fixes
127
+
128
  = 2.70 =
129
  * 2015/10/12
130
  * fixed a nasty bug with shortcode rendering (thanks Hey You!)