Google Maps Widget – Ultimate Google Maps Plugin - Version 2.25

Version Description

  • 2015/02/23
  • a few visual enhancements
  • new screenshots
  • shortcode name availability is checked before registering it
  • visual builder compatibility fix
Download this release

Release Info

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

Code changes from version 2.20 to 2.25

Files changed (6) hide show
  1. css/gmw-admin.css +16 -6
  2. css/gmw.css +5 -0
  3. gmw-tracking.php +2 -0
  4. gmw-widget.php +10 -6
  5. google-maps-widget.php +20 -5
  6. readme.txt +10 -1
css/gmw-admin.css CHANGED
@@ -13,7 +13,9 @@
13
  }
14
 
15
  .gmw-tabs {
16
- border-bottom: 1px solid #CCCCCC !important;
 
 
17
  }
18
 
19
  .gmw-tabs input.small-text {
@@ -23,6 +25,12 @@
23
 
24
  .gmw-tabs select {
25
  min-width: 230px;
 
 
 
 
 
 
26
  }
27
 
28
  option.promo {
@@ -121,8 +129,10 @@ option.promo {
121
  }
122
 
123
 
124
- #gmw-info h3 {
125
  margin: 25px 0 5px 0;
 
 
126
  }
127
 
128
  #gmw-info p {
@@ -138,8 +148,8 @@ option.promo {
138
  *
139
  * http://docs.jquery.com/UI/Tabs#theming
140
  */
141
- .ui-tabs { position: relative; padding: .2em; zoom: 1;margin-top:25px } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
142
- .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
143
  .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
144
  .ui-tabs .ui-tabs-nav li a { text-decoration: none; }
145
  .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; border-bottom: 1px solid white !important; }
@@ -147,7 +157,7 @@ option.promo {
147
  .ui-tabs .ui-tabs-nav li.ui-tabs-active a { outline: none;}
148
  .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
149
  .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
150
- .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 0.3em 1.4em; background: none; }
151
  .ui-tabs .ui-tabs-hide { display: none !important; }
152
 
153
  .ui-tabs .ui-tabs-nav li a {
@@ -173,7 +183,7 @@ option.promo {
173
 
174
  ul.ui-tabs-nav{
175
  float: left;
176
- border-bottom: 1px solid #CCCCCC;
177
  padding-bottom: 0;
178
  width: 100%;
179
  margin-bottom: 20px !important
13
  }
14
 
15
  .gmw-tabs {
16
+ border-bottom: 1px solid #e5e5e5 !important;
17
+ margin-left: -15px;
18
+ margin-right: -15px;
19
  }
20
 
21
  .gmw-tabs input.small-text {
25
 
26
  .gmw-tabs select {
27
  min-width: 230px;
28
+ max-width: 331px;
29
+ width: 100%;
30
+ }
31
+
32
+ .gmw-tabs input {
33
+ max-width: 331px;
34
  }
35
 
36
  option.promo {
129
  }
130
 
131
 
132
+ #gmw-info h3, #gmw-info h4, #gmw-info h5 {
133
  margin: 25px 0 5px 0;
134
+ text-transform: uppercase;
135
+ font-weight: bold;
136
  }
137
 
138
  #gmw-info p {
148
  *
149
  * http://docs.jquery.com/UI/Tabs#theming
150
  */
151
+ .ui-tabs { position: relative; padding: 0; zoom: 1;margin-top:25px } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
152
+ .ui-tabs .ui-tabs-nav { margin: 0; padding: 0 0 0 5px; box-sizing: border-box; }
153
  .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
154
  .ui-tabs .ui-tabs-nav li a { text-decoration: none; }
155
  .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; border-bottom: 1px solid white !important; }
157
  .ui-tabs .ui-tabs-nav li.ui-tabs-active a { outline: none;}
158
  .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
159
  .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
160
+ .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 0 15px; background: none; }
161
  .ui-tabs .ui-tabs-hide { display: none !important; }
162
 
163
  .ui-tabs .ui-tabs-nav li a {
183
 
184
  ul.ui-tabs-nav{
185
  float: left;
186
+ border-bottom: 1px solid #e5e5e5;
187
  padding-bottom: 0;
188
  width: 100%;
189
  margin-bottom: 20px !important
css/gmw.css CHANGED
@@ -17,6 +17,11 @@
17
  color: red;
18
  }
19
 
 
 
 
 
 
20
  /* Colorbox Core Style */
21
  #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
22
  #cboxWrapper {max-width:none;}
17
  color: red;
18
  }
19
 
20
+ .gmw-powered-by {
21
+ color: #666;
22
+ font-size: x-small;
23
+ }
24
+
25
  /* Colorbox Core Style */
26
  #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
27
  #cboxWrapper {max-width:none;}
gmw-tracking.php CHANGED
@@ -133,6 +133,8 @@ class GMW_tracking {
133
  $data['gmw_version'] = GMW_VER;
134
  $data['gmw_first_version'] = $options['first_version'];
135
  $data['gmw_first_install'] = $options['first_install'];
 
 
136
 
137
  $data['gmw_count'] = 0;
138
  $sidebars = get_option('sidebars_widgets', array());
133
  $data['gmw_version'] = GMW_VER;
134
  $data['gmw_first_version'] = $options['first_version'];
135
  $data['gmw_first_install'] = $options['first_install'];
136
+ $data['gmw_activated'] = GMW::is_activated();
137
+ $data['ioncube'] = extension_loaded('IonCube Loader');
138
 
139
  $data['gmw_count'] = 0;
140
  $sidebars = get_option('sidebars_widgets', array());
gmw-widget.php CHANGED
@@ -39,7 +39,7 @@ class GoogleMapsWidget extends WP_Widget {
39
  'thumb_type' => 'roadmap',
40
  'thumb_zoom' => '13',
41
  'thumb_header' => '',
42
- 'thumb_footer' => '',
43
  'thumb_color_scheme' => '',
44
  'thumb_link_type' => 'lightbox',
45
  'thumb_link' => '',
@@ -155,7 +155,7 @@ class GoogleMapsWidget extends WP_Widget {
155
  GMW::create_select_options($pin_sizes, $thumb_pin_size);
156
  echo '</select></p>';
157
 
158
- echo '<p class="gmw_thumb_pin_type_custom_section"><label class="gmw-label gmw-label-wide" for="' . $this->get_field_id('thumb_pin_img') . '">' . __('Custom 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>';
@@ -246,9 +246,9 @@ class GoogleMapsWidget extends WP_Widget {
246
  echo '</div>'; // shortcode tab
247
 
248
  echo '<div id="gmw-info">';
249
- echo '<h3>' . __('Support', 'google-maps-widget') . '</h3>';
250
  echo '<p>If you have any problems, questions or would like a new feature added post it on the <a href="https://wordpress.org/support/plugin/google-maps-widget" target="_blank">official support forum</a>. It\'s the only place to get support. Since it\'s free and community powered please be patient. <a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?business=gordan@webfactoryltd.com&cmd=_xclick&currency_code=USD&amount=19&item_name=Premium%20support%20for%20Google%20Maps%20Widget">Premium support</a> is available for $19.</p>';
251
- echo '<h3>' . __('Activate extra features &amp; options', 'google-maps-widget') . '</h3>';
252
  echo '<p>' . __('If you subscribe to our mailing list we\'ll instantly activate additional features in the plugin! At the moment those features are: shortcode support, 3 additional thumbnail map skins and 2 additional lightbox skins. More <i>activate by subscribing</i> features will be available soon!', 'google-maps-widget') . '<br>';
253
  if (GMW::is_activated()) {
254
  echo __('You\'ve already subscribed and activated extra features. Thank you!', 'google-maps-widget');
@@ -256,7 +256,7 @@ class GoogleMapsWidget extends WP_Widget {
256
  echo __('Subscribe and <a class="open_promo_dialog" href="#">activate extra features</a>.', 'google-maps-widget');
257
  }
258
  echo '</p>';
259
- echo '<h3>' . __('Rate the plugin &amp; spread the word', 'google-maps-widget') . '</h3>';
260
  echo '<p>It won\'t take you more than a minute but it will help us immensely. So please - <a href="https://wordpress.org/support/view/plugin-reviews/google-maps-widget" target="_blank">rate the plugin</a>. Or spread the word by <a href="https://twitter.com/intent/tweet?via=WebFactoryLtd&amp;text=' . urlencode('I\'m using the #free Google Maps Widget for #wordpress. You can grab it too at http://goo.gl/2qcbbf') . '" target="_blank">tweeting about it</a>. Thank you!</p>';
261
  echo '</div>'; // info tab
262
 
@@ -398,7 +398,11 @@ class GoogleMapsWidget extends WP_Widget {
398
  }
399
  $tmp .= '</p>';
400
  if (isset($instance['thumb_footer']) && $instance['thumb_footer']) {
401
- $tmp .= wpautop(do_shortcode($instance['thumb_footer']));
 
 
 
 
402
  }
403
  $out .= apply_filters('google_maps_widget_content', $tmp);
404
 
39
  'thumb_type' => 'roadmap',
40
  'thumb_zoom' => '13',
41
  'thumb_header' => '',
42
+ 'thumb_footer' => 'Powered by Google Maps Widget',
43
  'thumb_color_scheme' => '',
44
  'thumb_link_type' => 'lightbox',
45
  'thumb_link' => '',
155
  GMW::create_select_options($pin_sizes, $thumb_pin_size);
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>';
246
  echo '</div>'; // shortcode tab
247
 
248
  echo '<div id="gmw-info">';
249
+ echo '<h4>' . __('Support', 'google-maps-widget') . '</h4>';
250
  echo '<p>If you have any problems, questions or would like a new feature added post it on the <a href="https://wordpress.org/support/plugin/google-maps-widget" target="_blank">official support forum</a>. It\'s the only place to get support. Since it\'s free and community powered please be patient. <a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?business=gordan@webfactoryltd.com&cmd=_xclick&currency_code=USD&amount=19&item_name=Premium%20support%20for%20Google%20Maps%20Widget">Premium support</a> is available for $19.</p>';
251
+ echo '<h4>' . __('Activate extra features &amp; options', 'google-maps-widget') . '</h4>';
252
  echo '<p>' . __('If you subscribe to our mailing list we\'ll instantly activate additional features in the plugin! At the moment those features are: shortcode support, 3 additional thumbnail map skins and 2 additional lightbox skins. More <i>activate by subscribing</i> features will be available soon!', 'google-maps-widget') . '<br>';
253
  if (GMW::is_activated()) {
254
  echo __('You\'ve already subscribed and activated extra features. Thank you!', 'google-maps-widget');
256
  echo __('Subscribe and <a class="open_promo_dialog" href="#">activate extra features</a>.', 'google-maps-widget');
257
  }
258
  echo '</p>';
259
+ echo '<h4>' . __('Rate the plugin &amp; spread the word', 'google-maps-widget') . '</h4>';
260
  echo '<p>It won\'t take you more than a minute but it will help us immensely. So please - <a href="https://wordpress.org/support/view/plugin-reviews/google-maps-widget" target="_blank">rate the plugin</a>. Or spread the word by <a href="https://twitter.com/intent/tweet?via=WebFactoryLtd&amp;text=' . urlencode('I\'m using the #free Google Maps Widget for #wordpress. You can grab it too at http://goo.gl/2qcbbf') . '" target="_blank">tweeting about it</a>. Thank you!</p>';
261
  echo '</div>'; // info tab
262
 
398
  }
399
  $tmp .= '</p>';
400
  if (isset($instance['thumb_footer']) && $instance['thumb_footer']) {
401
+ if ($instance['thumb_footer'] == 'Powered by Google Maps Widget') {
402
+ $tmp .= '<span class="gmw-powered-by">Powered by <a href="http://www.googlemapswidget.com" target="_blank">Google Maps Widget</a></span>';
403
+ } else {
404
+ $tmp .= wpautop(do_shortcode($instance['thumb_footer']));
405
+ }
406
  }
407
  $out .= apply_filters('google_maps_widget_content', $tmp);
408
 
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.20
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: google-maps-widget
10
  Domain Path: lang
@@ -31,7 +31,7 @@ if (!defined('ABSPATH')) {
31
  }
32
 
33
 
34
- define('GMW_VER', '2.20');
35
  define('GMW_OPTIONS', 'gmw_options');
36
  define('GMW_CRON', 'gmw_cron');
37
 
@@ -174,16 +174,31 @@ class GMW {
174
  } // foreach $widgets
175
 
176
  echo $out;
177
- } // dialogs_markup
178
 
179
 
180
  // check availability and register shortcode
181
- // todo - add check fot already registered shortcodes and display error
182
  static function add_shortcode() {
183
- add_shortcode('gmw', array(__CLASS__, 'do_shortcode'));
 
 
 
 
 
 
184
  } // add_shortcode
185
 
186
 
 
 
 
 
 
 
 
 
 
 
187
  // enqueue frontend scripts if necessary
188
  static function enqueue_scripts() {
189
  if (is_active_widget(false, false, 'googlemapswidget', true)) {
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.25
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: google-maps-widget
10
  Domain Path: lang
31
  }
32
 
33
 
34
+ define('GMW_VER', '2.25');
35
  define('GMW_OPTIONS', 'gmw_options');
36
  define('GMW_CRON', 'gmw_cron');
37
 
174
  } // foreach $widgets
175
 
176
  echo $out;
177
+ } // dialogs_markup
178
 
179
 
180
  // check availability and register shortcode
 
181
  static function add_shortcode() {
182
+ global $shortcode_tags;
183
+
184
+ if (isset($shortcode_tags['gmw'])) {
185
+ add_action('admin_notices', array(__CLASS__, 'notice_sc_conflict_error'));
186
+ } else {
187
+ add_shortcode('gmw', array(__CLASS__, 'do_shortcode'));
188
+ }
189
  } // add_shortcode
190
 
191
 
192
+ // display notice if shortcode name is already taken
193
+ static function notice_sc_conflict_error() {
194
+ if (!self::is_activated()) {
195
+ return;
196
+ }
197
+
198
+ echo '<div class="error"><p><strong>' . __('Google Maps Widget shortcode is not active!', 'google-maps-widget') . '</strong>' . __(' Shortcode <i>[gmw]</i> is already in use by another plugin or theme. Please deactivate that theme or plugin.', 'google-maps-widget') . '</p></div>';
199
+ } // notice_sc_conflict_error
200
+
201
+
202
  // enqueue frontend scripts if necessary
203
  static function enqueue_scripts() {
204
  if (is_active_widget(false, false, 'googlemapswidget', true)) {
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.1
9
- Stable tag: 2.20
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
 
@@ -116,8 +116,17 @@ If you can't figure it out open a thread in the support forums.
116
  2. Larger map with all features is available in the lightbox
117
  3. Widget options - thumbnail map
118
  4. Widget options - lightbox map
 
 
119
 
120
  == Changelog ==
 
 
 
 
 
 
 
121
  = 2.20 =
122
  * 2015/02/16
123
  * added shortcode support
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: 3.3
8
  Tested up to: 4.1
9
+ Stable tag: 2.25
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
 
116
  2. Larger map with all features is available in the lightbox
117
  3. Widget options - thumbnail map
118
  4. Widget options - lightbox map
119
+ 5. Widget options - shortcode
120
+ 6. Widget options - info & support
121
 
122
  == Changelog ==
123
+ = 2.25 =
124
+ * 2015/02/23
125
+ * a few visual enhancements
126
+ * new screenshots
127
+ * shortcode name availability is checked before registering it
128
+ * visual builder compatibility fix
129
+
130
  = 2.20 =
131
  * 2015/02/16
132
  * added shortcode support