Version Description
- 2015/02/09
- fixed a plugin_deactivate bug nobody noticed for 2 years :(
- all JS texts are now loaded via wp_localize_script()
Download this release
Release Info
Developer | WebFactory |
Plugin | Google Maps Widget – Ultimate Google Maps Plugin |
Version | 2.15 |
Comparing to | |
See all releases |
Code changes from version 2.10 to 2.15
- gmw-tracking.php +6 -1
- gmw-widget.php +1 -1
- google-maps-widget.php +22 -7
- js/gmw-admin.js +5 -5
- lang/google-maps-widget.pot +25 -3
- readme.txt +7 -14
gmw-tracking.php
CHANGED
@@ -121,9 +121,14 @@ class GMW_tracking {
|
|
121 |
public static function prepare_data() {
|
122 |
$options = get_option(GMW_OPTIONS);
|
123 |
$data = array();
|
|
|
124 |
|
125 |
$data['url'] = home_url();
|
126 |
-
$
|
|
|
|
|
|
|
|
|
127 |
$data['wp_version'] = get_bloginfo('version');
|
128 |
$data['gmw_version'] = GMW_VER;
|
129 |
$data['gmw_first_version'] = $options['first_version'];
|
121 |
public static function prepare_data() {
|
122 |
$options = get_option(GMW_OPTIONS);
|
123 |
$data = array();
|
124 |
+
$current_user = wp_get_current_user();
|
125 |
|
126 |
$data['url'] = home_url();
|
127 |
+
if ($current_user && isset($current_user->user_email) && !empty($current_user->user_email)) {
|
128 |
+
$data['admin_email'] = $current_user->user_email;
|
129 |
+
} else {
|
130 |
+
$data['admin_email'] = get_bloginfo('admin_email');
|
131 |
+
}
|
132 |
$data['wp_version'] = get_bloginfo('version');
|
133 |
$data['gmw_version'] = GMW_VER;
|
134 |
$data['gmw_first_version'] = $options['first_version'];
|
gmw-widget.php
CHANGED
@@ -247,7 +247,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
247 |
echo '</div><p></p>'; // tabs
|
248 |
|
249 |
if (!GMW::is_activated()) {
|
250 |
-
echo '<p><i>' . __('Subscribe to our newsletter and <a href="#" class="open_promo_dialog">get extra features</a> for free
|
251 |
}
|
252 |
} // form
|
253 |
|
247 |
echo '</div><p></p>'; // tabs
|
248 |
|
249 |
if (!GMW::is_activated()) {
|
250 |
+
echo '<p><i>' . __('Subscribe to our newsletter and <a href="#" class="open_promo_dialog">get extra features</a> <b>for free</b>.', 'google-maps-widget') . '</i></p>';
|
251 |
}
|
252 |
} // form
|
253 |
|
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.
|
6 |
Author: Web factory Ltd
|
7 |
-
Version: 2.
|
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.
|
35 |
define('GMW_OPTIONS', 'gmw_options');
|
36 |
define('GMW_CRON', 'gmw_cron');
|
37 |
|
@@ -196,6 +196,13 @@ class GMW {
|
|
196 |
|
197 |
wp_enqueue_style('wp-jquery-ui-dialog');
|
198 |
wp_enqueue_style('gmw-admin', plugins_url('css/gmw-admin.css', __FILE__), array(), GMW_VER);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
} // if
|
200 |
} // admin_enqueue_scripts
|
201 |
|
@@ -399,19 +406,27 @@ class GMW {
|
|
399 |
static function deactivate() {
|
400 |
$options = get_option(GMW_OPTIONS);
|
401 |
|
402 |
-
if (isset($options['allow_tracking']) && $options['allow_tracking'] ===
|
403 |
-
unset($options['allow_tracking']);
|
404 |
-
update_option(GMW_OPTIONS, $options);
|
405 |
-
} elseif (isset($options['allow_tracking']) && $options['allow_tracking'] === true) {
|
406 |
GMW_tracking::clear_cron();
|
407 |
}
|
408 |
-
} //
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
409 |
} // class GMW
|
410 |
|
411 |
|
412 |
// hook everything up
|
413 |
register_activation_hook(__FILE__, array('GMW', 'activate'));
|
414 |
register_deactivation_hook(__FILE__, array('GMW', 'deactivate'));
|
|
|
415 |
add_action('init', array('GMW', 'init'));
|
416 |
add_action('plugins_loaded', array('GMW', 'plugins_loaded'));
|
417 |
add_action('widgets_init', array('GMW', 'widgets_init'));
|
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.
|
6 |
Author: Web factory Ltd
|
7 |
+
Version: 2.15
|
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.15');
|
35 |
define('GMW_OPTIONS', 'gmw_options');
|
36 |
define('GMW_CRON', 'gmw_cron');
|
37 |
|
196 |
|
197 |
wp_enqueue_style('wp-jquery-ui-dialog');
|
198 |
wp_enqueue_style('gmw-admin', plugins_url('css/gmw-admin.css', __FILE__), array(), GMW_VER);
|
199 |
+
|
200 |
+
$js_localize = array('subscribe_ok' => __('Check your inbox. Email with activation code is on its way.', 'google-maps-widget'),
|
201 |
+
'subscribe_duplicate' => __('You are already subscribed to our list. One activation code is valid for all sites so just use the code you already have.', 'google-maps-widget'),
|
202 |
+
'subscribe_error' => __('Something is not right on our end. Sorry :( Try again later.', 'google-maps-widget'),
|
203 |
+
'activate_ok' => __('Superb! Extra features are active ;)', 'google-maps-widget'),
|
204 |
+
'dialog_title' => __('GOOGLE MAPS WIDGET - Activate Extra Features', 'google-maps-widget'));
|
205 |
+
wp_localize_script('gmw-admin', 'gmw', $js_localize);
|
206 |
} // if
|
207 |
} // admin_enqueue_scripts
|
208 |
|
406 |
static function deactivate() {
|
407 |
$options = get_option(GMW_OPTIONS);
|
408 |
|
409 |
+
if (isset($options['allow_tracking']) && $options['allow_tracking'] === true) {
|
|
|
|
|
|
|
410 |
GMW_tracking::clear_cron();
|
411 |
}
|
412 |
+
} // deactivate
|
413 |
+
|
414 |
+
|
415 |
+
// clean up on uninstall / delete
|
416 |
+
static function uninstall() {
|
417 |
+
if (!defined('WP_UNINSTALL_PLUGIN')) {
|
418 |
+
return;
|
419 |
+
}
|
420 |
+
|
421 |
+
delete_option(GMW_OPTIONS);
|
422 |
+
} // uninstall
|
423 |
} // class GMW
|
424 |
|
425 |
|
426 |
// hook everything up
|
427 |
register_activation_hook(__FILE__, array('GMW', 'activate'));
|
428 |
register_deactivation_hook(__FILE__, array('GMW', 'deactivate'));
|
429 |
+
register_uninstall_hook(__FILE__, array('GMW', 'uninstall'));
|
430 |
add_action('init', array('GMW', 'init'));
|
431 |
add_action('plugins_loaded', array('GMW', 'plugins_loaded'));
|
432 |
add_action('widgets_init', array('GMW', 'widgets_init'));
|
js/gmw-admin.js
CHANGED
@@ -108,13 +108,13 @@ jQuery(function($) {
|
|
108 |
if (data == 'ok') {
|
109 |
$('#gmw_dialog_subscribe').hide();
|
110 |
$('#gmw_dialog_activate').show();
|
111 |
-
alert(
|
112 |
} else if (data == 'duplicate') {
|
113 |
$('#gmw_dialog_subscribe').hide();
|
114 |
$('#gmw_dialog_activate').show();
|
115 |
-
alert(
|
116 |
} else {
|
117 |
-
alert(
|
118 |
}
|
119 |
});
|
120 |
|
@@ -131,7 +131,7 @@ jQuery(function($) {
|
|
131 |
|
132 |
$.get(ajaxurl, { action: 'gmw_activate', 'code': $('#gmw_code').val()}, function(data) {
|
133 |
if (data == '1') {
|
134 |
-
alert(
|
135 |
if ($('#gmw_promo_dialog').data('widget-id')) {
|
136 |
$('#' + $('#gmw_promo_dialog').data('widget-id') + ' .widget-control-save').trigger('click');
|
137 |
}
|
@@ -154,7 +154,7 @@ jQuery(function($) {
|
|
154 |
'dialogClass' : 'wp-dialog gmw-dialog',
|
155 |
'modal' : true,
|
156 |
'width': 650,
|
157 |
-
'title':
|
158 |
'autoOpen': false,
|
159 |
'closeOnEscape': true,
|
160 |
close: function(event, ui) { $('#gmw_promo_dialog').data('widget-id', '') }
|
108 |
if (data == 'ok') {
|
109 |
$('#gmw_dialog_subscribe').hide();
|
110 |
$('#gmw_dialog_activate').show();
|
111 |
+
alert(gmw.subscribe_ok);
|
112 |
} else if (data == 'duplicate') {
|
113 |
$('#gmw_dialog_subscribe').hide();
|
114 |
$('#gmw_dialog_activate').show();
|
115 |
+
alert(gmw.subscribe_duplicate);
|
116 |
} else {
|
117 |
+
alert(gmw.subscribe_error);
|
118 |
}
|
119 |
});
|
120 |
|
131 |
|
132 |
$.get(ajaxurl, { action: 'gmw_activate', 'code': $('#gmw_code').val()}, function(data) {
|
133 |
if (data == '1') {
|
134 |
+
alert(gmw.activate_ok);
|
135 |
if ($('#gmw_promo_dialog').data('widget-id')) {
|
136 |
$('#' + $('#gmw_promo_dialog').data('widget-id') + ' .widget-control-save').trigger('click');
|
137 |
}
|
154 |
'dialogClass' : 'wp-dialog gmw-dialog',
|
155 |
'modal' : true,
|
156 |
'width': 650,
|
157 |
+
'title': gmw.dialog_title,
|
158 |
'autoOpen': false,
|
159 |
'closeOnEscape': true,
|
160 |
close: function(event, ui) { $('#gmw_promo_dialog').data('widget-id', '') }
|
lang/google-maps-widget.pot
CHANGED
@@ -5,8 +5,8 @@ msgstr ""
|
|
5 |
"Project-Id-Version: Google Maps Widget 2.1\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/google-maps-widget\n"
|
7 |
"POT-Creation-Date: \n"
|
8 |
-
"PO-Revision-Date: 2015-
|
9 |
-
"Last-Translator: Web factory Ltd <
|
10 |
"Language-Team: LANGUAGE <gmw@webfactoryltd.com>\n"
|
11 |
"Language: en_US\n"
|
12 |
"MIME-Version: 1.0\n"
|
@@ -50,6 +50,10 @@ msgstr ""
|
|
50 |
msgid "Brown"
|
51 |
msgstr ""
|
52 |
|
|
|
|
|
|
|
|
|
53 |
msgid "Click to open larger map"
|
54 |
msgstr ""
|
55 |
|
@@ -102,6 +106,10 @@ msgstr ""
|
|
102 |
msgid "Footer Text"
|
103 |
msgstr ""
|
104 |
|
|
|
|
|
|
|
|
|
105 |
msgid "Google Maps Widget"
|
106 |
msgstr ""
|
107 |
|
@@ -237,6 +245,10 @@ msgstr ""
|
|
237 |
msgid "Small"
|
238 |
msgstr ""
|
239 |
|
|
|
|
|
|
|
|
|
240 |
# gmw-widget.php:240
|
241 |
msgid ""
|
242 |
"Subscribe and <a class=\"open_promo_dialog\" href=\"#\">activate extra features</"
|
@@ -246,7 +258,7 @@ msgstr ""
|
|
246 |
# gmw-widget.php:250
|
247 |
msgid ""
|
248 |
"Subscribe to our newsletter and <a href=\"#\" class=\"open_promo_dialog\">get "
|
249 |
-
"extra features</a> for free
|
250 |
msgstr ""
|
251 |
|
252 |
# google-maps-widget.php:241
|
@@ -255,6 +267,10 @@ msgid ""
|
|
255 |
"b>!"
|
256 |
msgstr ""
|
257 |
|
|
|
|
|
|
|
|
|
258 |
#, fuzzy
|
259 |
msgid "Support"
|
260 |
msgstr "Support"
|
@@ -289,6 +305,12 @@ msgstr ""
|
|
289 |
msgid "Yellow"
|
290 |
msgstr ""
|
291 |
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
# gmw-widget.php:238
|
293 |
msgid "You've already subscribed and activated extra features. Thank you!"
|
294 |
msgstr ""
|
5 |
"Project-Id-Version: Google Maps Widget 2.1\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/google-maps-widget\n"
|
7 |
"POT-Creation-Date: \n"
|
8 |
+
"PO-Revision-Date: 2015-02-08 20:17+0100\n"
|
9 |
+
"Last-Translator: Web factory Ltd <info@webfactoryltd.com>\n"
|
10 |
"Language-Team: LANGUAGE <gmw@webfactoryltd.com>\n"
|
11 |
"Language: en_US\n"
|
12 |
"MIME-Version: 1.0\n"
|
50 |
msgid "Brown"
|
51 |
msgstr ""
|
52 |
|
53 |
+
# google-maps-widget.php:200
|
54 |
+
msgid "Check your inbox. Email with activation code is on its way."
|
55 |
+
msgstr ""
|
56 |
+
|
57 |
msgid "Click to open larger map"
|
58 |
msgstr ""
|
59 |
|
106 |
msgid "Footer Text"
|
107 |
msgstr ""
|
108 |
|
109 |
+
# google-maps-widget.php:204
|
110 |
+
msgid "GOOGLE MAPS WIDGET - Activate Extra Features"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
msgid "Google Maps Widget"
|
114 |
msgstr ""
|
115 |
|
245 |
msgid "Small"
|
246 |
msgstr ""
|
247 |
|
248 |
+
# google-maps-widget.php:202
|
249 |
+
msgid "Something is not right on our end. Sorry :( Try again later."
|
250 |
+
msgstr ""
|
251 |
+
|
252 |
# gmw-widget.php:240
|
253 |
msgid ""
|
254 |
"Subscribe and <a class=\"open_promo_dialog\" href=\"#\">activate extra features</"
|
258 |
# gmw-widget.php:250
|
259 |
msgid ""
|
260 |
"Subscribe to our newsletter and <a href=\"#\" class=\"open_promo_dialog\">get "
|
261 |
+
"extra features</a> <b>for free</b>."
|
262 |
msgstr ""
|
263 |
|
264 |
# google-maps-widget.php:241
|
267 |
"b>!"
|
268 |
msgstr ""
|
269 |
|
270 |
+
# google-maps-widget.php:203
|
271 |
+
msgid "Superb! Extra features are active ;)"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
#, fuzzy
|
275 |
msgid "Support"
|
276 |
msgstr "Support"
|
305 |
msgid "Yellow"
|
306 |
msgstr ""
|
307 |
|
308 |
+
# google-maps-widget.php:201
|
309 |
+
msgid ""
|
310 |
+
"You are already subscribed to our list. One activation code is valid for all "
|
311 |
+
"sites so just use the code you already have."
|
312 |
+
msgstr ""
|
313 |
+
|
314 |
# gmw-widget.php:238
|
315 |
msgid "You've already subscribed and activated extra features. Thank you!"
|
316 |
msgstr ""
|
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.
|
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 |
|
@@ -113,6 +113,11 @@ If you can figure it out open a thread in the support forums.
|
|
113 |
4. Widget options - lightbox map
|
114 |
|
115 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
116 |
= 2.10 =
|
117 |
* 2015/02/02
|
118 |
* auto-adjust map size on smaller screens - thanks bruzm!
|
@@ -364,16 +369,4 @@ If you can figure it out open a thread in the support forums.
|
|
364 |
|
365 |
= 0.1 =
|
366 |
* 2012/08/03
|
367 |
-
* Initial release
|
368 |
-
|
369 |
-
|
370 |
-
== Upgrade Notice ==
|
371 |
-
|
372 |
-
= 0.2 =
|
373 |
-
Due to variable name changes footer text will be reset
|
374 |
-
|
375 |
-
= 0.1x =
|
376 |
-
Upgrade without any fear :)
|
377 |
-
|
378 |
-
= 0.1 =
|
379 |
-
Initial release
|
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.15
|
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 |
|
113 |
4. Widget options - lightbox map
|
114 |
|
115 |
== Changelog ==
|
116 |
+
= 2.15 =
|
117 |
+
* 2015/02/09
|
118 |
+
* fixed a plugin_deactivate bug nobody noticed for 2 years :(
|
119 |
+
* all JS texts are now loaded via wp_localize_script()
|
120 |
+
|
121 |
= 2.10 =
|
122 |
* 2015/02/02
|
123 |
* auto-adjust map size on smaller screens - thanks bruzm!
|
369 |
|
370 |
= 0.1 =
|
371 |
* 2012/08/03
|
372 |
+
* Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|