Version Description
- 2015/01/19
- code rewriting
- minor bug fixes
Download this release
Release Info
Developer | WebFactory |
Plugin | Google Maps Widget – Ultimate Google Maps Plugin |
Version | 2.05 |
Comparing to | |
See all releases |
Code changes from version 2.01 to 2.05
- css/gmw-admin.css +74 -11
- google-maps-widget.php +19 -13
- js/gmw-admin.js +22 -8
- readme.txt +13 -6
css/gmw-admin.css
CHANGED
@@ -29,34 +29,97 @@ option.promo {
|
|
29 |
color: #e14d43;
|
30 |
}
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
#gmw_promo_dialog ul {
|
33 |
list-style-position: inside;
|
34 |
-
list-style-type:
|
35 |
}
|
36 |
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
|
41 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
color: #dd3d36;
|
|
|
|
|
|
|
43 |
}
|
44 |
|
45 |
#gmw_promo_dialog .center {
|
46 |
text-align: center;
|
47 |
}
|
48 |
|
49 |
-
#gmw_promo_dialog h3 {
|
50 |
-
margin-top: 0;
|
51 |
-
}
|
52 |
-
|
53 |
#gmw_dialog_activate {
|
54 |
display: none;
|
55 |
}
|
56 |
|
57 |
-
#gmw_dialog_subscribe {
|
58 |
-
display: block;
|
59 |
-
}
|
60 |
|
61 |
#gmw-info h3 {
|
62 |
margin: 25px 0 5px 0;
|
29 |
color: #e14d43;
|
30 |
}
|
31 |
|
32 |
+
#gmw_promo_dialog {
|
33 |
+
padding: 0;
|
34 |
+
display: none;
|
35 |
+
}
|
36 |
+
|
37 |
+
.gmw-dialog .ui-dialog-titlebar {
|
38 |
+
height: 60px;
|
39 |
+
background-color: rgb(48, 48, 48);
|
40 |
+
text-align: center;
|
41 |
+
}
|
42 |
+
|
43 |
+
.gmw-dialog .footer {
|
44 |
+
padding: 30px 135px;
|
45 |
+
background-color: rgb(48, 48, 48);
|
46 |
+
color: rgb(137, 137, 137);
|
47 |
+
}
|
48 |
+
|
49 |
+
.gmw-dialog .content {
|
50 |
+
padding: 30px 135px;
|
51 |
+
background-color: #FFF;
|
52 |
+
}
|
53 |
+
|
54 |
+
.gmw-dialog h3 b {
|
55 |
+
color: rgb(225, 77, 67);
|
56 |
+
}
|
57 |
+
|
58 |
+
.gmw-dialog h3 {
|
59 |
+
line-height: 150%;
|
60 |
+
font-weight: normal;
|
61 |
+
margin: 0 0 30px 0;
|
62 |
+
}
|
63 |
+
|
64 |
+
.gmw-dialog .ui-dialog-title {
|
65 |
+
line-height: 60px;
|
66 |
+
color: rgb(137, 137, 137);
|
67 |
+
}
|
68 |
+
|
69 |
+
.gmw-dialog .ui-dialog-titlebar-close {
|
70 |
+
top: 12px;
|
71 |
+
}
|
72 |
+
|
73 |
#gmw_promo_dialog ul {
|
74 |
list-style-position: inside;
|
75 |
+
list-style-type: disc;
|
76 |
}
|
77 |
|
78 |
+
.gmw-dialog input {
|
79 |
+
width: 100%;
|
80 |
+
height: 45px;
|
81 |
+
}
|
82 |
+
|
83 |
+
.gmw-dialog input.error {
|
84 |
+
border-color: rgb(225, 77, 67);
|
85 |
+
outline-color: rgb(225, 77, 67);
|
86 |
+
-webkit-box-shadow: rgba(225, 77, 67, 0.8) 0px 0px 2px 0px;
|
87 |
+
}
|
88 |
+
|
89 |
+
.gmw-dialog .input_row {
|
90 |
+
margin-bottom: 16px;
|
91 |
+
}
|
92 |
+
|
93 |
+
.gmw-dialog .big-button {
|
94 |
+
height: 54px;
|
95 |
+
line-height: 53px;
|
96 |
+
width: 100%;
|
97 |
+
font-weight: bold;
|
98 |
+
text-transform: uppercase;
|
99 |
+
margin-top: 5px;
|
100 |
}
|
101 |
|
102 |
+
.gmw-dialog #gmw_already_subscribed {
|
103 |
+
margin-top: 18px;
|
104 |
+
display: inline-block;
|
105 |
+
color: #999;
|
106 |
+
}
|
107 |
+
|
108 |
+
#gmw_promo_dialog span.error {
|
109 |
color: #dd3d36;
|
110 |
+
padding: 8px 0 0 1px;
|
111 |
+
display: inline-block;
|
112 |
+
|
113 |
}
|
114 |
|
115 |
#gmw_promo_dialog .center {
|
116 |
text-align: center;
|
117 |
}
|
118 |
|
|
|
|
|
|
|
|
|
119 |
#gmw_dialog_activate {
|
120 |
display: none;
|
121 |
}
|
122 |
|
|
|
|
|
|
|
123 |
|
124 |
#gmw-info h3 {
|
125 |
margin: 25px 0 5px 0;
|
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 |
|
@@ -217,7 +217,7 @@ class GMW {
|
|
217 |
$options = get_option(GMW_OPTIONS);
|
218 |
|
219 |
if (isset($options['activated']) && $options['activated'] === true) {
|
220 |
-
return
|
221 |
} else {
|
222 |
return false;
|
223 |
}
|
@@ -230,16 +230,22 @@ class GMW {
|
|
230 |
return false;
|
231 |
}
|
232 |
|
233 |
-
$
|
234 |
-
$
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
$out
|
241 |
-
|
242 |
-
$out .= '<p><
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
$out .= '</div>'; // activate screen
|
244 |
$out .= '</div>'; // dialog
|
245 |
|
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.05
|
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.05');
|
35 |
define('GMW_OPTIONS', 'gmw_options');
|
36 |
define('GMW_CRON', 'gmw_cron');
|
37 |
|
217 |
$options = get_option(GMW_OPTIONS);
|
218 |
|
219 |
if (isset($options['activated']) && $options['activated'] === true) {
|
220 |
+
return true;
|
221 |
} else {
|
222 |
return false;
|
223 |
}
|
230 |
return false;
|
231 |
}
|
232 |
|
233 |
+
$current_user = wp_get_current_user();
|
234 |
+
if (empty($current_user->user_firstname)) {
|
235 |
+
$name = $current_user->display_name;
|
236 |
+
} else {
|
237 |
+
$name = $current_user->user_firstname;
|
238 |
+
}
|
239 |
+
|
240 |
+
$out = '<div id="gmw_promo_dialog">';
|
241 |
+
$out .= '<div id="gmw_dialog_subscribe"><div class="content"><h3 class="center">Subscribe to our newsletter<br>and get extra features & options <b>for FREE</b>!</h3>';
|
242 |
+
$out .= '<p class="input_row"><input value="' . $name . '" type="text" id="gmw_name" name="gmw_name" placeholder="Your name"><span class="error name" style="display: none;">Please enter your name.</span></p>';
|
243 |
+
$out .= '<p class="input_row"><input value="' . $current_user->user_email . '" type="text" name="gmw_email" id="gmw_email" placeholder="Your email address"><span style="display: none;" class="error email">Please double check your email address.</span></p>';
|
244 |
+
$out .= '<p class="center"><a id="gmw_subscribe" href="#" class="button button-primary big-button">Subscribe & activate extra features</a><br><a href="#" class="" id="gmw_already_subscribed">I\'m already subscribed</a></p></div>';
|
245 |
+
$out .= '<div class="footer"><p><b>Why subscribe?</b></p><ul><li>We\'ll never share your email address</li><li>We won\'t spam you or overwhelm with emails</li><li>Be the first to get notified about new features</li><li>You\'ll get all future upgrades for free as well</li><li>You\'ll get discounts for our premium WP plugins</li></ul></div>';
|
246 |
+
$out .= '</div>'; // dialog subscribe
|
247 |
+
$out .= '<div id="gmw_dialog_activate"><div class="content"><h3 class="center">Enter your code and activate extra features</h3><p class="input_row"><input type="text" id="gmw_code" name="gmw_code" placeholder="Your activation code"><span style="display: none;" class="error gmw_code">Please double check the activation code.</span></p><p class="center"><a href="#" class="button button-primary big-button" id="gmw_activate">Activate extra features</a></p></div>';
|
248 |
+
$out .= '<div class="footer"><p><b>FAQ</b></p><ul><li>Already subscribed? Enter your activation code above.</li><li>Didn\'t receive the email? Check your SPAM folder.</li><li>Lost your code or having other problems? <a href="mailto:gmw@webfactoryltd.com?subject=Lost%20activation%20code">Email us</a>.</li><li>Code is valid for an unlimited number of plugin installations.</li></ul></div>';
|
249 |
$out .= '</div>'; // activate screen
|
250 |
$out .= '</div>'; // dialog
|
251 |
|
js/gmw-admin.js
CHANGED
@@ -80,19 +80,30 @@ jQuery(function($) {
|
|
80 |
$('#gmw_subscribe').on('click', function(e) {
|
81 |
e.preventDefault();
|
82 |
|
|
|
|
|
|
|
|
|
83 |
if ($('#gmw_name').val().length < 3) {
|
84 |
-
|
|
|
85 |
$('#gmw_name').focus().select();
|
86 |
-
|
|
|
87 |
}
|
88 |
|
89 |
re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
90 |
if (!re.test($('#gmw_email').val())) {
|
91 |
-
|
|
|
92 |
$('#gmw_email').focus().select();
|
93 |
return false;
|
94 |
}
|
95 |
|
|
|
|
|
|
|
|
|
96 |
$.post(ajaxurl, { action: 'gmw_subscribe', 'name': $('#gmw_name').val(), 'email': $('#gmw_email').val()}, function(data) {
|
97 |
if (data == 'ok') {
|
98 |
$('#gmw_dialog_subscribe').hide();
|
@@ -115,6 +126,9 @@ jQuery(function($) {
|
|
115 |
$('#gmw_activate').on('click', function(e) {
|
116 |
e.preventDefault();
|
117 |
|
|
|
|
|
|
|
118 |
$.get(ajaxurl, { action: 'gmw_activate', 'code': $('#gmw_code').val()}, function(data) {
|
119 |
if (data == '1') {
|
120 |
alert('Superb! Extra features are active ;)');
|
@@ -123,7 +137,7 @@ jQuery(function($) {
|
|
123 |
}
|
124 |
$('#gmw_promo_dialog').dialog('close');
|
125 |
} else {
|
126 |
-
|
127 |
$('#gmw_code').focus().select();
|
128 |
}
|
129 |
});
|
@@ -137,12 +151,12 @@ jQuery(function($) {
|
|
137 |
$('#gmw_dialog_activate').hide();
|
138 |
|
139 |
$('#gmw_promo_dialog').dialog({
|
140 |
-
'dialogClass' : 'wp-dialog',
|
141 |
'modal' : true,
|
142 |
'width': 650,
|
143 |
-
'title': '
|
144 |
-
'autoOpen'
|
145 |
-
'closeOnEscape'
|
146 |
close: function(event, ui) { $('#gmw_promo_dialog').data('widget-id', '') }
|
147 |
}).dialog('open');
|
148 |
|
80 |
$('#gmw_subscribe').on('click', function(e) {
|
81 |
e.preventDefault();
|
82 |
|
83 |
+
$err = 0;
|
84 |
+
$('#gmw_promo_dialog input.error').removeClass('error');
|
85 |
+
$('#gmw_promo_dialog span.error').hide();
|
86 |
+
|
87 |
if ($('#gmw_name').val().length < 3) {
|
88 |
+
$('#gmw_name').addClass('error');
|
89 |
+
$('#gmw_promo_dialog span.error.name').show();
|
90 |
$('#gmw_name').focus().select();
|
91 |
+
|
92 |
+
$err = 1;
|
93 |
}
|
94 |
|
95 |
re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
96 |
if (!re.test($('#gmw_email').val())) {
|
97 |
+
$('#gmw_email').addClass('error');
|
98 |
+
$('#gmw_promo_dialog span.error.email').show();
|
99 |
$('#gmw_email').focus().select();
|
100 |
return false;
|
101 |
}
|
102 |
|
103 |
+
if ($err) {
|
104 |
+
return false;
|
105 |
+
}
|
106 |
+
|
107 |
$.post(ajaxurl, { action: 'gmw_subscribe', 'name': $('#gmw_name').val(), 'email': $('#gmw_email').val()}, function(data) {
|
108 |
if (data == 'ok') {
|
109 |
$('#gmw_dialog_subscribe').hide();
|
126 |
$('#gmw_activate').on('click', function(e) {
|
127 |
e.preventDefault();
|
128 |
|
129 |
+
$('#gmw_promo_dialog input.error').removeClass('error');
|
130 |
+
$('#gmw_promo_dialog span.error').hide();
|
131 |
+
|
132 |
$.get(ajaxurl, { action: 'gmw_activate', 'code': $('#gmw_code').val()}, function(data) {
|
133 |
if (data == '1') {
|
134 |
alert('Superb! Extra features are active ;)');
|
137 |
}
|
138 |
$('#gmw_promo_dialog').dialog('close');
|
139 |
} else {
|
140 |
+
$('#gmw_promo_dialog span.error.gmw_code').show();
|
141 |
$('#gmw_code').focus().select();
|
142 |
}
|
143 |
});
|
151 |
$('#gmw_dialog_activate').hide();
|
152 |
|
153 |
$('#gmw_promo_dialog').dialog({
|
154 |
+
'dialogClass' : 'wp-dialog gmw-dialog',
|
155 |
'modal' : true,
|
156 |
'width': 650,
|
157 |
+
'title': 'GOOGLE MAPS WIDGET - Activate Extra Features',
|
158 |
+
'autoOpen': false,
|
159 |
+
'closeOnEscape': true,
|
160 |
close: function(event, ui) { $('#gmw_promo_dialog').data('widget-id', '') }
|
161 |
}).dialog('open');
|
162 |
|
readme.txt
CHANGED
@@ -6,13 +6,13 @@ 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 |
|
13 |
== Description ==
|
14 |
|
15 |
-
Check out some examples on the <a href="http://www.googlemapswidget.com/">official plugin site</a>, view the [Google Maps Widget video](http://www.youtube.com/watch?v=y1siX9ha7Pw) or give us a shout <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>.
|
16 |
|
17 |
http://www.youtube.com/watch?v=y1siX9ha7Pw&hd=1
|
18 |
|
@@ -27,10 +27,10 @@ http://www.youtube.com/watch?v=y1siX9ha7Pw&hd=1
|
|
27 |
* map type - road, satellite, map or hybrid
|
28 |
* pin color
|
29 |
* pin size
|
30 |
-
* custom pin icon
|
31 |
* zoom level
|
32 |
* link type - lightbox, custom URL or disable link
|
33 |
-
* map color scheme -
|
34 |
* text above map
|
35 |
* text below map
|
36 |
|
@@ -39,7 +39,7 @@ http://www.youtube.com/watch?v=y1siX9ha7Pw&hd=1
|
|
39 |
* map size - width & height
|
40 |
* map type - road, satellite, map or hybrid
|
41 |
* zoom level
|
42 |
-
* skin - light
|
43 |
* show/hide address bubble
|
44 |
* show/hide map title
|
45 |
* header text
|
@@ -57,6 +57,8 @@ http://www.youtube.com/watch?v=y1siX9ha7Pw&hd=1
|
|
57 |
* "an easier way to add Google maps to your site" says <a href="http://www.wpbeginner.com/wp-tutorials/how-to-add-google-maps-in-wordpress/">WP Beginner</a>
|
58 |
* <a href="http://designscrazed.org/wordpress-google-map-plugins/">Design Crazed</a> puts in on the top 20 Google maps list
|
59 |
* <a href="http://www.inkthemes.com/easily-integrate-google-map-in-your-wordpress-themes-widget-area/09/">InkThemes</a> shows how easy it is to use GMW
|
|
|
|
|
60 |
|
61 |
**Translators (thank you!)**
|
62 |
|
@@ -70,7 +72,7 @@ http://www.youtube.com/watch?v=y1siX9ha7Pw&hd=1
|
|
70 |
* Chinese traditional - Wyeoh
|
71 |
* Dutch - Arno
|
72 |
* Ukrainian - Victor Shutovskiy
|
73 |
-
* Serbian - Ogi Djuraskovic from <a href="http://firstsiteguide.com/">FirstSiteGuide</a>
|
74 |
|
75 |
== Installation ==
|
76 |
|
@@ -111,6 +113,11 @@ If you can figure it out open a thread in the support forums.
|
|
111 |
4. Widget options - lightbox map
|
112 |
|
113 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
114 |
= 2.01 =
|
115 |
* 2015/01/13
|
116 |
* somehow one JS file got renamed :(
|
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.05
|
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 |
|
13 |
== Description ==
|
14 |
|
15 |
+
Check out some examples on the <a href="http://www.googlemapswidget.com/">official plugin site</a>, view the [Google Maps Widget video](http://www.youtube.com/watch?v=y1siX9ha7Pw) or give us a shout on Twitter <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>.
|
16 |
|
17 |
http://www.youtube.com/watch?v=y1siX9ha7Pw&hd=1
|
18 |
|
27 |
* map type - road, satellite, map or hybrid
|
28 |
* pin color
|
29 |
* pin size
|
30 |
+
* custom pin icon - any image can be used
|
31 |
* zoom level
|
32 |
* link type - lightbox, custom URL or disable link
|
33 |
+
* map color scheme - default, refreshed, apple, gray, paper
|
34 |
* text above map
|
35 |
* text below map
|
36 |
|
39 |
* map size - width & height
|
40 |
* map type - road, satellite, map or hybrid
|
41 |
* zoom level
|
42 |
+
* skin - light, dark, blue, rounded
|
43 |
* show/hide address bubble
|
44 |
* show/hide map title
|
45 |
* header text
|
57 |
* "an easier way to add Google maps to your site" says <a href="http://www.wpbeginner.com/wp-tutorials/how-to-add-google-maps-in-wordpress/">WP Beginner</a>
|
58 |
* <a href="http://designscrazed.org/wordpress-google-map-plugins/">Design Crazed</a> puts in on the top 20 Google maps list
|
59 |
* <a href="http://www.inkthemes.com/easily-integrate-google-map-in-your-wordpress-themes-widget-area/09/">InkThemes</a> shows how easy it is to use GMW
|
60 |
+
* <a href="http://www.indexwp.com/google-maps-widget/">IndexWP</a> calls it a "handy map plugin"
|
61 |
+
|
62 |
|
63 |
**Translators (thank you!)**
|
64 |
|
72 |
* Chinese traditional - Wyeoh
|
73 |
* Dutch - Arno
|
74 |
* Ukrainian - Victor Shutovskiy
|
75 |
+
* Serbian - Ogi Djuraskovic from <a href="http://firstsiteguide.com/">FirstSiteGuide</a>
|
76 |
|
77 |
== Installation ==
|
78 |
|
113 |
4. Widget options - lightbox map
|
114 |
|
115 |
== Changelog ==
|
116 |
+
= 2.05 =
|
117 |
+
* 2015/01/19
|
118 |
+
* code rewriting
|
119 |
+
* minor bug fixes
|
120 |
+
|
121 |
= 2.01 =
|
122 |
* 2015/01/13
|
123 |
* somehow one JS file got renamed :(
|