Version Description
- 2015/11/18
- fixed a big bug in JS (widget admin UI init)
Download this release
Release Info
Developer | WebFactory |
Plugin | Google Maps Widget – Ultimate Google Maps Plugin |
Version | 2.80 |
Comparing to | |
See all releases |
Code changes from version 2.75 to 2.80
- gmw-widget.php +12 -8
- google-maps-widget.php +6 -6
- images/santa_cap.png +0 -0
- js/gmw-admin.js +8 -2
- readme.txt +5 -1
gmw-widget.php
CHANGED
@@ -123,16 +123,20 @@ class GoogleMapsWidget extends WP_Widget {
|
|
123 |
array_push($lightbox_skins, array('val' => 'noimage-blue', 'label' => __('Blue', 'google-maps-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') . '" 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 & Support', 'google-maps-widget') . '</a></li></ul>';
|
131 |
echo '<div id="gmw-thumb">';
|
132 |
|
133 |
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_width') . '">' . __('Map Size', 'google-maps-widget') . ':</label>';
|
134 |
-
echo '<input min="50" max="640" step="1" class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="number" value="' . esc_attr($thumb_width) . '" required /> x ';
|
135 |
-
echo '<input min="50" max="640" step="1" class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="number" value="' . esc_attr($thumb_height) . '" required />';
|
136 |
echo ' px</p>';
|
137 |
|
138 |
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_type') . '">' . __('Map Type', 'google-maps-widget') . ':</label>';
|
@@ -156,7 +160,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="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,7 +173,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" 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') . '">';
|
@@ -189,8 +193,8 @@ class GoogleMapsWidget extends WP_Widget {
|
|
189 |
echo '<div id="gmw-lightbox">';
|
190 |
|
191 |
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_width') . '">' . __('Map Size', 'google-maps-widget') . ':</label>';
|
192 |
-
echo '<input min="50" max="2000" step="1" class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="number" value="' . esc_attr($lightbox_width) . '" required /> x ';
|
193 |
-
echo '<input min="50" max="2000" step="1" class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="number" value="' . esc_attr($lightbox_height) . '" required />';
|
194 |
echo ' px</p>';
|
195 |
|
196 |
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_type') . '">' . __('Map Type', 'google-maps-widget') . ':</label>';
|
123 |
array_push($lightbox_skins, array('val' => 'noimage-blue', 'label' => __('Blue', 'google-maps-widget')),
|
124 |
array('val' => 'noimage-rounded', 'label' => __('Rounded', 'google-maps-widget')));
|
125 |
}
|
126 |
+
|
127 |
+
if (date('Y-m-d') < '2015-12-20') {
|
128 |
+
echo '<a title="Decorate your site for Christmas with Xmas Widget" href="http://xmaswidget.webfactoryltd.com/" target="_blank" style="position: absolute; top: -21px; left: -17px;"><img title="Decorate your site for Christmas with Xmas Widget" alt="Decorate your site for Christmas with Xmas Widget" src="' . plugins_url('/images/santa_cap.png', __FILE__) . '"></a>';
|
129 |
+
}
|
130 |
+
|
131 |
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>';
|
132 |
+
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="required" /></p>';
|
133 |
|
134 |
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 & Support', 'google-maps-widget') . '</a></li></ul>';
|
135 |
echo '<div id="gmw-thumb">';
|
136 |
|
137 |
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_width') . '">' . __('Map Size', 'google-maps-widget') . ':</label>';
|
138 |
+
echo '<input min="50" max="640" step="1" class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="number" value="' . esc_attr($thumb_width) . '" required="required" /> x ';
|
139 |
+
echo '<input min="50" max="640" step="1" class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="number" value="' . esc_attr($thumb_height) . '" required="required" />';
|
140 |
echo ' px</p>';
|
141 |
|
142 |
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_type') . '">' . __('Map Type', 'google-maps-widget') . ':</label>';
|
160 |
echo '</select></p>';
|
161 |
|
162 |
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>';
|
163 |
+
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="required" />';
|
164 |
|
165 |
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_zoom') . '">' . __('Zoom Level', 'google-maps-widget') . ':</label>';
|
166 |
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
173 |
echo '</select></p>';
|
174 |
|
175 |
echo '<p class="gmw_thumb_link_section"><label class="gmw-label" for="' . $this->get_field_id('thumb_link') . '">' . __('Custom URL', 'google-maps-widget') . ':</label>';
|
176 |
+
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="required" /></p>';
|
177 |
|
178 |
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_color_scheme') . '">' . __('Color Scheme', 'google-maps-widget') . ':</label>';
|
179 |
echo '<select class="gmw_thumb_color_scheme" id="' . $this->get_field_id('thumb_color_scheme') . '" name="' . $this->get_field_name('thumb_color_scheme') . '">';
|
193 |
echo '<div id="gmw-lightbox">';
|
194 |
|
195 |
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_width') . '">' . __('Map Size', 'google-maps-widget') . ':</label>';
|
196 |
+
echo '<input min="50" max="2000" step="1" class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="number" value="' . esc_attr($lightbox_width) . '" required="required" /> x ';
|
197 |
+
echo '<input min="50" max="2000" step="1" class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="number" value="' . esc_attr($lightbox_height) . '" required="required" />';
|
198 |
echo ' px</p>';
|
199 |
|
200 |
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_type') . '">' . __('Map Type', 'google-maps-widget') . ':</label>';
|
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.
|
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.
|
44 |
|
45 |
// hook everything up
|
46 |
static function init() {
|
@@ -223,7 +223,7 @@ class GMW {
|
|
223 |
$options['dismiss_notice_rate'] = true;
|
224 |
update_option(GMW_OPTIONS, $options);
|
225 |
}
|
226 |
-
|
227 |
if ($_GET['redirect']) {
|
228 |
wp_redirect($_GET['redirect']);
|
229 |
} else {
|
@@ -237,7 +237,7 @@ class GMW {
|
|
237 |
static function add_notices() {
|
238 |
$options = get_option(GMW_OPTIONS, array());
|
239 |
$notice = false;
|
240 |
-
|
241 |
if (empty($options['dismiss_notice_upgrade']) && !self::is_activated()) {
|
242 |
add_action('admin_notices', array(__CLASS__, 'notice_activate_extra_features'));
|
243 |
$notice = true;
|
@@ -270,8 +270,8 @@ class GMW {
|
|
270 |
echo ' <a href="' . esc_url($dismiss_url) . '" class="">' . __('Dismiss notice', 'google-maps-widget') . '</a>';
|
271 |
echo '</p></div>';
|
272 |
} // notice_activate_extra_features
|
273 |
-
|
274 |
-
|
275 |
// display message to get extra features for GMW
|
276 |
static function notice_rate_plugin() {
|
277 |
$rate_url = 'https://wordpress.org/support/view/plugin-reviews/google-maps-widget?rate=5#postform';
|
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.80
|
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.80';
|
44 |
|
45 |
// hook everything up
|
46 |
static function init() {
|
223 |
$options['dismiss_notice_rate'] = true;
|
224 |
update_option(GMW_OPTIONS, $options);
|
225 |
}
|
226 |
+
|
227 |
if ($_GET['redirect']) {
|
228 |
wp_redirect($_GET['redirect']);
|
229 |
} else {
|
237 |
static function add_notices() {
|
238 |
$options = get_option(GMW_OPTIONS, array());
|
239 |
$notice = false;
|
240 |
+
|
241 |
if (empty($options['dismiss_notice_upgrade']) && !self::is_activated()) {
|
242 |
add_action('admin_notices', array(__CLASS__, 'notice_activate_extra_features'));
|
243 |
$notice = true;
|
270 |
echo ' <a href="' . esc_url($dismiss_url) . '" class="">' . __('Dismiss notice', 'google-maps-widget') . '</a>';
|
271 |
echo '</p></div>';
|
272 |
} // notice_activate_extra_features
|
273 |
+
|
274 |
+
|
275 |
// display message to get extra features for GMW
|
276 |
static function notice_rate_plugin() {
|
277 |
$rate_url = 'https://wordpress.org/support/view/plugin-reviews/google-maps-widget?rate=5#postform';
|
images/santa_cap.png
ADDED
Binary file
|
js/gmw-admin.js
CHANGED
@@ -12,10 +12,16 @@ jQuery(function($) {
|
|
12 |
|
13 |
// re-init JS on widget update and add
|
14 |
$(document).on('widget-updated', function(event, widget) {
|
15 |
-
|
|
|
|
|
|
|
16 |
});
|
17 |
$(document).on('widget-added', function(event, widget) {
|
18 |
-
|
|
|
|
|
|
|
19 |
});
|
20 |
|
21 |
|
12 |
|
13 |
// re-init JS on widget update and add
|
14 |
$(document).on('widget-updated', function(event, widget) {
|
15 |
+
id = $(widget).attr('id');
|
16 |
+
if (id.indexOf(gmw.id_base) != -1) {
|
17 |
+
gmw_init_widget_ui(widget);
|
18 |
+
}
|
19 |
});
|
20 |
$(document).on('widget-added', function(event, widget) {
|
21 |
+
id = $(widget).attr('id');
|
22 |
+
if (id.indexOf(gmw.id_base) != -1) {
|
23 |
+
gmw_init_widget_ui(widget);
|
24 |
+
}
|
25 |
});
|
26 |
|
27 |
|
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.
|
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.75 =
|
125 |
* 2015/10/26
|
126 |
* minor JS tweaks and bug fixes
|
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.80
|
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.80 =
|
125 |
+
* 2015/11/18
|
126 |
+
* fixed a big bug in JS (widget admin UI init)
|
127 |
+
|
128 |
= 2.75 =
|
129 |
* 2015/10/26
|
130 |
* minor JS tweaks and bug fixes
|