Version Description
- 2016/04/14
- bug fixes
- WP v4.5 updates
Download this release
Release Info
Developer | WebFactory |
Plugin | Google Maps Widget – Ultimate Google Maps Plugin |
Version | 3.30 |
Comparing to | |
See all releases |
Code changes from version 3.25 to 3.30
- css/gmw-admin.css +8 -2
- css/gmw.css +8 -8
- gmw-widget.php +17 -4
- google-maps-widget.php +124 -105
- js/gmw-admin-plugins.js +27 -0
- js/gmw-admin.js +18 -3
- js/gmw.js +6 -3
- readme.txt +10 -5
css/gmw-admin.css
CHANGED
@@ -47,6 +47,10 @@
|
|
47 |
display: inline-block;
|
48 |
}
|
49 |
|
|
|
|
|
|
|
|
|
50 |
.gmw-tabs p.colorpicker_section {
|
51 |
height: 30px;
|
52 |
}
|
@@ -465,10 +469,10 @@ ul.ui-tabs-nav{
|
|
465 |
|
466 |
/* fixes for customizer */
|
467 |
#customize-theme-controls .ui-tabs ul.ui-tabs-nav li {
|
468 |
-
margin: 0 0 -1px
|
469 |
}
|
470 |
#customize-theme-controls .ui-tabs .ui-tabs-nav li a {
|
471 |
-
padding: 0
|
472 |
}
|
473 |
#customize-theme-controls .ui-tabs .ui-tabs-nav li.ui-tabs-active {
|
474 |
border-bottom: 3px solid white !important;
|
@@ -637,6 +641,7 @@ ul.ui-tabs-nav{
|
|
637 |
padding: 30px 0px;
|
638 |
text-align: center;
|
639 |
margin: 0px !important;
|
|
|
640 |
}
|
641 |
|
642 |
.gmw-footer-intro a {
|
@@ -1001,6 +1006,7 @@ ul.ui-tabs-nav{
|
|
1001 |
|
1002 |
#gmw_dialog_intro .header p {
|
1003 |
margin: 0;
|
|
|
1004 |
}
|
1005 |
|
1006 |
.gmw-discount {
|
47 |
display: inline-block;
|
48 |
}
|
49 |
|
50 |
+
.control-panel-widgets label.label-holder {
|
51 |
+
display: none;
|
52 |
+
}
|
53 |
+
|
54 |
.gmw-tabs p.colorpicker_section {
|
55 |
height: 30px;
|
56 |
}
|
469 |
|
470 |
/* fixes for customizer */
|
471 |
#customize-theme-controls .ui-tabs ul.ui-tabs-nav li {
|
472 |
+
margin: 0 0 -1px 10px;
|
473 |
}
|
474 |
#customize-theme-controls .ui-tabs .ui-tabs-nav li a {
|
475 |
+
padding: 0 6px;
|
476 |
}
|
477 |
#customize-theme-controls .ui-tabs .ui-tabs-nav li.ui-tabs-active {
|
478 |
border-bottom: 3px solid white !important;
|
641 |
padding: 30px 0px;
|
642 |
text-align: center;
|
643 |
margin: 0px !important;
|
644 |
+
font-size: 15px;
|
645 |
}
|
646 |
|
647 |
.gmw-footer-intro a {
|
1006 |
|
1007 |
#gmw_dialog_intro .header p {
|
1008 |
margin: 0;
|
1009 |
+
font-size: 15px;
|
1010 |
}
|
1011 |
|
1012 |
.gmw-discount {
|
css/gmw.css
CHANGED
@@ -56,7 +56,7 @@
|
|
56 |
.gmw-dark .cboxIframe{background:#fff;}
|
57 |
.gmw-dark #cboxError{padding:50px; border:1px solid #ccc;}
|
58 |
.gmw-dark #cboxLoadedContent{margin-bottom:28px;}
|
59 |
-
.gmw-dark #cboxTitle{position:absolute; bottom
|
60 |
.gmw-dark #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
|
61 |
.gmw-dark #cboxLoadingOverlay{background:url(../images/colorbox/dark/loading_background.png) no-repeat center center;}
|
62 |
.gmw-dark #cboxPrevious, .gmw-dark #cboxNext, .gmw-dark #cboxSlideshow, .gmw-dark #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
|
@@ -152,7 +152,7 @@
|
|
152 |
.gmw-noimage-rounded span.better-caption { line-height:16px; text-align:left; margin-bottom:6px; display:block; }
|
153 |
.gmw-noimage-rounded #cboxError{padding:50px; border:1px solid #ccc;}
|
154 |
.gmw-noimage-rounded #cboxLoadedContent{margin-bottom:24px; font-style: italic; }
|
155 |
-
.gmw-noimage-rounded #cboxTitle{ position:absolute; bottom
|
156 |
.gmw-noimage-rounded #cboxCurrent{position:absolute; bottom:0px; left:100px; color:#999; text-transform:capitalize; display:inline-block; padding-left:1.5em; }
|
157 |
.gmw-noimage-rounded #cboxLoadingOverlay{background:#fff;}
|
158 |
.gmw-noimage-rounded #cboxPrevious, .gmw-noimage-rounded #cboxNext, .gmw-noimage-rounded #cboxSlideshow, .gmw-noimage-rounded #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; text-transform:capitalize; }
|
@@ -329,7 +329,7 @@
|
|
329 |
.gmw-gray-square #cboxError{padding:50px; border:1px solid #ccc;}
|
330 |
.gmw-gray-square #cboxLoadedContent{margin-bottom:5px;}
|
331 |
.gmw-gray-square #cboxLoadingOverlay{background:url(../images/colorbox/gray-square/loading_background.png) no-repeat center center;}
|
332 |
-
.gmw-gray-square #cboxTitle{position:absolute; bottom:-
|
333 |
.gmw-gray-square #cboxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;}
|
334 |
.gmw-gray-square #cboxPrevious, .gmw-gray-square #cboxNext, .gmw-gray-square #cboxSlideshow, .gmw-gray-square #cboxClose {border:0; padding:0; margin:0; overflow:visible; position:absolute; bottom:-29px; background:url(../images/colorbox/gray-square/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;}
|
335 |
.gmw-gray-square #cboxPrevious:active, .gmw-gray-square #cboxNext:active, .gmw-gray-square #cboxSlideshow:active, .gmw-gray-square #cboxClose:active {outline:0;}
|
@@ -352,7 +352,7 @@
|
|
352 |
.gmw-square-white #cboxError{padding:50px; border:1px solid #ccc;}
|
353 |
.gmw-square-white #cboxLoadedContent{background:#FFF; padding:1px;}
|
354 |
.gmw-square-white #cboxLoadingOverlay{background:#000;}
|
355 |
-
.gmw-square-white #cboxTitle{position:absolute; top:-
|
356 |
.gmw-square-white #cboxCurrent{position:absolute; top:-22px; right:205px; text-indent:-9999px;}
|
357 |
.gmw-square-white #cboxPrevious, .gmw-square-white #cboxNext, .gmw-square-white #cboxSlideshow, .gmw-square-white #cboxClose {border:0; padding:0; margin:0; overflow:visible; text-indent:-9999px; width:20px; height:20px; position:absolute; top:-20px; background:url(../images/colorbox/square-white/controls.png) no-repeat 0 0;}
|
358 |
.gmw-square-white #cboxPrevious:active, .gmw-square-white #cboxNext:active, .gmw-square-white #cboxSlideshow:active, .gmw-square-white #cboxClose:active {outline:0;}
|
@@ -375,7 +375,7 @@
|
|
375 |
.gmw-square-black .cboxIframe{background:#fff;}
|
376 |
.gmw-square-black #cboxError{padding:50px; border:1px solid #ccc;}
|
377 |
.gmw-square-black #cboxLoadedContent{border:5px solid #000; background:#fff;}
|
378 |
-
.gmw-square-black #cboxTitle{position:absolute; top:-
|
379 |
.gmw-square-black #cboxCurrent{position:absolute; top:-20px; right:0px; color:#ccc;}
|
380 |
.gmw-square-black #cboxPrevious, .gmw-square-black #cboxNext, .gmw-square-black #cboxSlideshow, .gmw-square-black #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
|
381 |
.gmw-square-black #cboxPrevious:active, .gmw-square-black #cboxNext:active, .gmw-square-black #cboxSlideshow:active, .gmw-square-black #cboxClose:active {outline:0;}
|
@@ -477,7 +477,7 @@
|
|
477 |
.gmw-noimage span.better-caption { line-height:16px; text-align:left; margin-bottom:6px; display:block; }
|
478 |
.gmw-noimage #cboxError{padding:50px; border:1px solid #ccc;}
|
479 |
.gmw-noimage #cboxLoadedContent{margin-bottom:24px; font-style: italic; }
|
480 |
-
.gmw-noimage #cboxTitle{ position:absolute; bottom:
|
481 |
.gmw-noimage #cboxCurrent{position:absolute; bottom:0px; left:100px; color:#999; text-transform:capitalize; display:inline-block; padding-left:1.5em; }
|
482 |
.gmw-noimage #cboxPrevious, .gmw-noimage #cboxNext, .gmw-noimage #cboxSlideshow, .gmw-noimage #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; text-transform:capitalize; }
|
483 |
.gmw-noimage #cboxPrevious:active, .gmw-noimage #cboxNext:active, .gmw-noimage #cboxSlideshow:active, .gmw-noimage #cboxClose:active {outline:0;}
|
@@ -509,7 +509,7 @@
|
|
509 |
.gmw-noimage-polaroid #cboxError{padding:50px; border:1px solid #ccc;}
|
510 |
.gmw-noimage-polaroid .gmw-header, .gmw-noimage-polaroid .gmw-footer{color:#FFF; background:#333;}
|
511 |
.gmw-noimage-polaroid #cboxLoadedContent{ margin-bottom:90px; font-style: italic; }
|
512 |
-
.gmw-noimage-polaroid #cboxTitle{ position:absolute; bottom:0; clear:both; text-align:
|
513 |
.gmw-noimage-polaroid #cboxCurrent{ display:none;}
|
514 |
.gmw-noimage-polaroid #cboxPrevious, .gmw-noimage-polaroid #cboxNext, .gmw-noimage-polaroid #cboxSlideshow, .gmw-noimage-polaroid #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; text-transform:capitalize; }
|
515 |
.gmw-noimage-polaroid #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
|
@@ -611,7 +611,7 @@
|
|
611 |
.gmw-wood .cboxPhoto.withLongCaption { margin-bottom:0px; }
|
612 |
.gmw-wood #cboxError{padding:50px; border:1px solid #ccc;}
|
613 |
.gmw-wood #cboxLoadedContent{margin-bottom:0px; font-style: italic;background:#ffffff; }
|
614 |
-
.gmw-wood #cboxTitle { position:absolute; left:0; top:100%; margin-top:
|
615 |
.gmw-wood #cboxCurrent{ display:none !important;}
|
616 |
.gmw-wood #cboxPrevious, .gmw-wood #cboxNext, .gmw-wood #cboxSlideshow, .gmw-wood #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; text-transform:capitalize; }
|
617 |
.gmw-wood #cboxPrevious:active, .gmw-wood #cboxNext:active, .gmw-wood #cboxSlideshow:active, .gmw-wood #cboxClose:active {outline:0;}
|
56 |
.gmw-dark .cboxIframe{background:#fff;}
|
57 |
.gmw-dark #cboxError{padding:50px; border:1px solid #ccc;}
|
58 |
.gmw-dark #cboxLoadedContent{margin-bottom:28px;}
|
59 |
+
.gmw-dark #cboxTitle{position:absolute; bottom:11px; left:0; text-align:center; width:100%; color:#949494; }
|
60 |
.gmw-dark #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
|
61 |
.gmw-dark #cboxLoadingOverlay{background:url(../images/colorbox/dark/loading_background.png) no-repeat center center;}
|
62 |
.gmw-dark #cboxPrevious, .gmw-dark #cboxNext, .gmw-dark #cboxSlideshow, .gmw-dark #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
|
152 |
.gmw-noimage-rounded span.better-caption { line-height:16px; text-align:left; margin-bottom:6px; display:block; }
|
153 |
.gmw-noimage-rounded #cboxError{padding:50px; border:1px solid #ccc;}
|
154 |
.gmw-noimage-rounded #cboxLoadedContent{margin-bottom:24px; font-style: italic; }
|
155 |
+
.gmw-noimage-rounded #cboxTitle{ position:absolute; bottom:-8px; clear:both; text-align:left; width:100%; color:#999; min-height:16px; overflow:hidden; }
|
156 |
.gmw-noimage-rounded #cboxCurrent{position:absolute; bottom:0px; left:100px; color:#999; text-transform:capitalize; display:inline-block; padding-left:1.5em; }
|
157 |
.gmw-noimage-rounded #cboxLoadingOverlay{background:#fff;}
|
158 |
.gmw-noimage-rounded #cboxPrevious, .gmw-noimage-rounded #cboxNext, .gmw-noimage-rounded #cboxSlideshow, .gmw-noimage-rounded #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; text-transform:capitalize; }
|
329 |
.gmw-gray-square #cboxError{padding:50px; border:1px solid #ccc;}
|
330 |
.gmw-gray-square #cboxLoadedContent{margin-bottom:5px;}
|
331 |
.gmw-gray-square #cboxLoadingOverlay{background:url(../images/colorbox/gray-square/loading_background.png) no-repeat center center;}
|
332 |
+
.gmw-gray-square #cboxTitle{position:absolute; bottom:-32px; left:0; text-align:center; width:100%; font-weight:bold; color:#7C7C7C;}
|
333 |
.gmw-gray-square #cboxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;}
|
334 |
.gmw-gray-square #cboxPrevious, .gmw-gray-square #cboxNext, .gmw-gray-square #cboxSlideshow, .gmw-gray-square #cboxClose {border:0; padding:0; margin:0; overflow:visible; position:absolute; bottom:-29px; background:url(../images/colorbox/gray-square/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;}
|
335 |
.gmw-gray-square #cboxPrevious:active, .gmw-gray-square #cboxNext:active, .gmw-gray-square #cboxSlideshow:active, .gmw-gray-square #cboxClose:active {outline:0;}
|
352 |
.gmw-square-white #cboxError{padding:50px; border:1px solid #ccc;}
|
353 |
.gmw-square-white #cboxLoadedContent{background:#FFF; padding:1px;}
|
354 |
.gmw-square-white #cboxLoadingOverlay{background:#000;}
|
355 |
+
.gmw-square-white #cboxTitle{position:absolute; top:-30px; left:0; color:#000;}
|
356 |
.gmw-square-white #cboxCurrent{position:absolute; top:-22px; right:205px; text-indent:-9999px;}
|
357 |
.gmw-square-white #cboxPrevious, .gmw-square-white #cboxNext, .gmw-square-white #cboxSlideshow, .gmw-square-white #cboxClose {border:0; padding:0; margin:0; overflow:visible; text-indent:-9999px; width:20px; height:20px; position:absolute; top:-20px; background:url(../images/colorbox/square-white/controls.png) no-repeat 0 0;}
|
358 |
.gmw-square-white #cboxPrevious:active, .gmw-square-white #cboxNext:active, .gmw-square-white #cboxSlideshow:active, .gmw-square-white #cboxClose:active {outline:0;}
|
375 |
.gmw-square-black .cboxIframe{background:#fff;}
|
376 |
.gmw-square-black #cboxError{padding:50px; border:1px solid #ccc;}
|
377 |
.gmw-square-black #cboxLoadedContent{border:5px solid #000; background:#fff;}
|
378 |
+
.gmw-square-black #cboxTitle{position:absolute; top:-28px; left:0; color:#ccc;}
|
379 |
.gmw-square-black #cboxCurrent{position:absolute; top:-20px; right:0px; color:#ccc;}
|
380 |
.gmw-square-black #cboxPrevious, .gmw-square-black #cboxNext, .gmw-square-black #cboxSlideshow, .gmw-square-black #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
|
381 |
.gmw-square-black #cboxPrevious:active, .gmw-square-black #cboxNext:active, .gmw-square-black #cboxSlideshow:active, .gmw-square-black #cboxClose:active {outline:0;}
|
477 |
.gmw-noimage span.better-caption { line-height:16px; text-align:left; margin-bottom:6px; display:block; }
|
478 |
.gmw-noimage #cboxError{padding:50px; border:1px solid #ccc;}
|
479 |
.gmw-noimage #cboxLoadedContent{margin-bottom:24px; font-style: italic; }
|
480 |
+
.gmw-noimage #cboxTitle{ position:absolute; bottom:7px; clear:both; text-align:left; width:100%; color:#999; min-height:16px; overflow:hidden; }
|
481 |
.gmw-noimage #cboxCurrent{position:absolute; bottom:0px; left:100px; color:#999; text-transform:capitalize; display:inline-block; padding-left:1.5em; }
|
482 |
.gmw-noimage #cboxPrevious, .gmw-noimage #cboxNext, .gmw-noimage #cboxSlideshow, .gmw-noimage #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; text-transform:capitalize; }
|
483 |
.gmw-noimage #cboxPrevious:active, .gmw-noimage #cboxNext:active, .gmw-noimage #cboxSlideshow:active, .gmw-noimage #cboxClose:active {outline:0;}
|
509 |
.gmw-noimage-polaroid #cboxError{padding:50px; border:1px solid #ccc;}
|
510 |
.gmw-noimage-polaroid .gmw-header, .gmw-noimage-polaroid .gmw-footer{color:#FFF; background:#333;}
|
511 |
.gmw-noimage-polaroid #cboxLoadedContent{ margin-bottom:90px; font-style: italic; }
|
512 |
+
.gmw-noimage-polaroid #cboxTitle{ position:absolute; bottom:0; clear:both; text-align:center; width:100%; color:#666; height:55px; overflow:hidden; font-style:italic; }
|
513 |
.gmw-noimage-polaroid #cboxCurrent{ display:none;}
|
514 |
.gmw-noimage-polaroid #cboxPrevious, .gmw-noimage-polaroid #cboxNext, .gmw-noimage-polaroid #cboxSlideshow, .gmw-noimage-polaroid #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; text-transform:capitalize; }
|
515 |
.gmw-noimage-polaroid #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
|
611 |
.gmw-wood .cboxPhoto.withLongCaption { margin-bottom:0px; }
|
612 |
.gmw-wood #cboxError{padding:50px; border:1px solid #ccc;}
|
613 |
.gmw-wood #cboxLoadedContent{margin-bottom:0px; font-style: italic;background:#ffffff; }
|
614 |
+
.gmw-wood #cboxTitle { position:absolute; left:0; top:100%; margin-top:15px; clear:both; text-align:center; width:100%; overflow:hidden;min-height:16px;background:transparent; padding:8px 0; font-size:12px;color:#29282c; text-shadow:0px 0px 22px rgba(255,255,255,1.0);}
|
615 |
.gmw-wood #cboxCurrent{ display:none !important;}
|
616 |
.gmw-wood #cboxPrevious, .gmw-wood #cboxNext, .gmw-wood #cboxSlideshow, .gmw-wood #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; text-transform:capitalize; }
|
617 |
.gmw-wood #cboxPrevious:active, .gmw-wood #cboxNext:active, .gmw-wood #cboxSlideshow:active, .gmw-wood #cboxClose:active {outline:0;}
|
gmw-widget.php
CHANGED
@@ -59,7 +59,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
59 |
$title .= ' <b>PRO</b>';
|
60 |
}
|
61 |
|
62 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => __('Displays a map image thumbnail with a larger map available in a lightbox.', 'google-maps-widget'));
|
63 |
$control_ops = array('width' => 450, 'height' => 350);
|
64 |
parent::__construct('GoogleMapsWidget', $title, $widget_ops, $control_ops);
|
65 |
|
@@ -296,6 +296,12 @@ class GoogleMapsWidget extends WP_Widget {
|
|
296 |
|
297 |
array_push($thumb_pin_colors, array('val' => '-1', 'label' => __('PRO offers unlimited color choices', 'google-maps-widget')));
|
298 |
} // not activated
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
|
300 |
// warn if API key is not set
|
301 |
if (!GMW::get_api_key()) {
|
@@ -422,7 +428,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
422 |
echo '<select data-tooltip="Choose from a custom size or a fullscreen, border-to-border option for the lightbox map." class="gmw_lightbox_fullscreen" id="' . $this->get_field_id('lightbox_fullscreen') . '" name="' . $this->get_field_name('lightbox_fullscreen') . '">';
|
423 |
GMW::create_select_options($lightbox_sizes, $lightbox_fullscreen);
|
424 |
echo '</select>';
|
425 |
-
echo '<span class="gmw_lightbox_fullscreen_custom_section"><label class="gmw-label" for=""> </label>';
|
426 |
echo '<input data-title="Map Width" data-tooltip="Interactive map width in pixels; from 50 to 2000. If needed, map will be resized to accomodate for smaller screens." class="small-text fullscreen_fix" min="50" max="2000" step="1" id="' . $this->get_field_id('lightbox_width') . '" type="number" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" required="required"> x ';
|
427 |
echo '<input data-title="Map Height" data-tooltip="Interactive map height in pixels; from 50 to 2000. If needed, map will be resized to accomodate for smaller screens." class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="number" step="1" min="50" max="2000" type="text" value="' . esc_attr($lightbox_height) . '" required="required"> px</span></p>';
|
428 |
|
@@ -537,9 +543,9 @@ class GoogleMapsWidget extends WP_Widget {
|
|
537 |
echo '</div><p></p>'; // tabs
|
538 |
|
539 |
if (!GMW::is_activated()) {
|
540 |
-
echo '<p>' . __('Upgrade to Google Maps Widget <span class="gmw-pro-red">PRO</span> to get more than 50 extra options available immeditely. <a class="open_promo_dialog" href="#">Upgrade now</a>.', 'google-maps-widget') . '</p>';
|
541 |
} else {
|
542 |
-
echo '<p>' . sprintf(__('Additional options are available in <a href="%s" title="Settings">settings</a>. ', 'google-maps-widget'), admin_url('options-general.php?page=gmw_options')) . __('If you experience any problems or need help, please contact <a href="mailto:gmw@webfactoryltd.com?subject=GMW%20support">support</a>.', 'google-maps-widget') . '</p>';
|
543 |
}
|
544 |
} // form
|
545 |
|
@@ -547,7 +553,14 @@ class GoogleMapsWidget extends WP_Widget {
|
|
547 |
// update/save widget options
|
548 |
function update($new_instance, $old_instance) {
|
549 |
$instance = array();
|
|
|
|
|
|
|
550 |
|
|
|
|
|
|
|
|
|
551 |
$instance['title'] = $new_instance['title'];
|
552 |
$instance['address'] = strip_tags(trim($new_instance['address']));
|
553 |
|
59 |
$title .= ' <b>PRO</b>';
|
60 |
}
|
61 |
|
62 |
+
$widget_ops = array('classname' => 'google-maps-widget', 'description' => __('Displays a map image thumbnail with a larger map available in a lightbox.', 'google-maps-widget'), 'customize_selective_refresh' => true);
|
63 |
$control_ops = array('width' => 450, 'height' => 350);
|
64 |
parent::__construct('GoogleMapsWidget', $title, $widget_ops, $control_ops);
|
65 |
|
296 |
|
297 |
array_push($thumb_pin_colors, array('val' => '-1', 'label' => __('PRO offers unlimited color choices', 'google-maps-widget')));
|
298 |
} // not activated
|
299 |
+
|
300 |
+
$tmp = apply_filters('gmw_widget_form_before', null, $this, $instance);
|
301 |
+
if (!empty($tmp)) {
|
302 |
+
echo $tmp;
|
303 |
+
return;
|
304 |
+
}
|
305 |
|
306 |
// warn if API key is not set
|
307 |
if (!GMW::get_api_key()) {
|
428 |
echo '<select data-tooltip="Choose from a custom size or a fullscreen, border-to-border option for the lightbox map." class="gmw_lightbox_fullscreen" id="' . $this->get_field_id('lightbox_fullscreen') . '" name="' . $this->get_field_name('lightbox_fullscreen') . '">';
|
429 |
GMW::create_select_options($lightbox_sizes, $lightbox_fullscreen);
|
430 |
echo '</select>';
|
431 |
+
echo '<span class="gmw_lightbox_fullscreen_custom_section"><label class="gmw-label label-holder" for=""> </label>';
|
432 |
echo '<input data-title="Map Width" data-tooltip="Interactive map width in pixels; from 50 to 2000. If needed, map will be resized to accomodate for smaller screens." class="small-text fullscreen_fix" min="50" max="2000" step="1" id="' . $this->get_field_id('lightbox_width') . '" type="number" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" required="required"> x ';
|
433 |
echo '<input data-title="Map Height" data-tooltip="Interactive map height in pixels; from 50 to 2000. If needed, map will be resized to accomodate for smaller screens." class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="number" step="1" min="50" max="2000" type="text" value="' . esc_attr($lightbox_height) . '" required="required"> px</span></p>';
|
434 |
|
543 |
echo '</div><p></p>'; // tabs
|
544 |
|
545 |
if (!GMW::is_activated()) {
|
546 |
+
echo '<p class="widget_footer_info">' . __('Upgrade to Google Maps Widget <span class="gmw-pro-red">PRO</span> to get more than 50 extra options available immeditely. <a class="open_promo_dialog" href="#">Upgrade now</a>.', 'google-maps-widget') . '</p>';
|
547 |
} else {
|
548 |
+
echo '<p class="widget_footer_info">' . sprintf(__('Additional options are available in <a href="%s" title="Settings">settings</a>. ', 'google-maps-widget'), admin_url('options-general.php?page=gmw_options')) . __('If you experience any problems or need help, please contact <a href="mailto:gmw@webfactoryltd.com?subject=GMW%20support">support</a>.', 'google-maps-widget') . '</p>';
|
549 |
}
|
550 |
} // form
|
551 |
|
553 |
// update/save widget options
|
554 |
function update($new_instance, $old_instance) {
|
555 |
$instance = array();
|
556 |
+
if (!is_array($old_instance)) {
|
557 |
+
$old_instance = array();
|
558 |
+
}
|
559 |
|
560 |
+
if (sizeof($new_instance) < 10) {
|
561 |
+
return $old_instance;
|
562 |
+
}
|
563 |
+
|
564 |
$instance['title'] = $new_instance['title'];
|
565 |
$instance['address'] = strip_tags(trim($new_instance['address']));
|
566 |
|
google-maps-widget.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google Maps Widget
|
|
4 |
Plugin URI: http://www.gmapswidget.com/
|
5 |
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available as an image replacement or in a lightbox. Includes shortcode support and numerous options.
|
6 |
Author: Web factory Ltd
|
7 |
-
Version: 3.
|
8 |
Author URI: http://www.webfactoryltd.com/
|
9 |
Text Domain: google-maps-widget
|
10 |
Domain Path: lang
|
@@ -42,12 +42,11 @@ require_once GMW_PLUGIN_DIR . 'gmw-widget.php';
|
|
42 |
require_once GMW_PLUGIN_DIR . 'gmw-map-styles.php';
|
43 |
require_once GMW_PLUGIN_DIR . 'gmw-export-import.php';
|
44 |
if (file_exists(GMW_PLUGIN_DIR . 'gmw-pro-license.php')) {
|
45 |
-
require_once GMW_PLUGIN_DIR . 'gmw-pro-license.php';
|
46 |
}
|
47 |
|
48 |
-
|
49 |
class GMW {
|
50 |
-
static $version = '3.
|
51 |
static $options = 'gmw_options';
|
52 |
static $licensing_servers = array('http://license.gmapswidget.com/', 'http://license2.gmapswidget.com/');
|
53 |
|
@@ -56,7 +55,7 @@ class GMW {
|
|
56 |
static function init() {
|
57 |
if (is_admin()) {
|
58 |
// check if minimal required WP version is present
|
59 |
-
if (false === GMW::check_wp_version(
|
60 |
return false;
|
61 |
}
|
62 |
|
@@ -69,7 +68,7 @@ class GMW {
|
|
69 |
add_filter('plugin_row_meta', array('GMW', 'plugin_meta_links'), 10, 2);
|
70 |
|
71 |
// enqueue admin scripts
|
72 |
-
add_action('admin_enqueue_scripts', array('GMW', 'admin_enqueue_scripts'));
|
73 |
add_action('customize_controls_enqueue_scripts', array('GMW', 'admin_enqueue_scripts'));
|
74 |
|
75 |
// JS dialog markup
|
@@ -104,6 +103,11 @@ class GMW {
|
|
104 |
|
105 |
// add shortcode support
|
106 |
GMW::add_shortcodes();
|
|
|
|
|
|
|
|
|
|
|
107 |
} // init
|
108 |
|
109 |
|
@@ -315,7 +319,7 @@ class GMW {
|
|
315 |
|
316 |
// display error message if WP version is too low
|
317 |
static function notice_min_version_error() {
|
318 |
-
echo '<div class="error"><p>' . sprintf(__('Google Maps Widget <b>requires WordPress version
|
319 |
} // notice_min_version_error
|
320 |
|
321 |
|
@@ -475,56 +479,58 @@ class GMW {
|
|
475 |
|
476 |
// print dialogs markup in footer
|
477 |
static function dialogs_markup() {
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
484 |
}
|
485 |
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
492 |
}
|
493 |
-
|
494 |
-
|
|
|
|
|
495 |
}
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
$map_url = GMW::build_lightbox_url($widget);
|
501 |
-
|
502 |
-
if ($widget['lightbox_fullscreen']) {
|
503 |
-
$widget['lightbox_width'] = '100%';
|
504 |
-
$widget['lightbox_height'] = '100%';
|
505 |
-
}
|
506 |
-
|
507 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-map-height="' . $widget['lightbox_height'] . '"
|
508 |
-
data-map-width="' . $widget['lightbox_width'] . '" data-thumb-height="' . $widget['thumb_height'] . '"
|
509 |
-
data-thumb-width="' . $widget['thumb_width'] . '" data-map-skin="' . $widget['lightbox_skin'] . '"
|
510 |
-
data-map-iframe-url="' . $map_url . '" id="gmw-dialog-' . $widget['id'] . '" title="' . esc_attr($widget['title']) . '"
|
511 |
-
data-close-button="' . (int) in_array('close_button', $widget['lightbox_feature']) . '"
|
512 |
-
data-show-title="' . (int) in_array('title', $widget['lightbox_feature']) . '"
|
513 |
-
data-close-overlay="' . (int) in_array('overlay_close', $widget['lightbox_feature']) . '"
|
514 |
-
data-close-esc="' . (int) in_array('esc_close', $widget['lightbox_feature']) . '">';
|
515 |
-
if ($widget['lightbox_header']) {
|
516 |
-
$tmp = str_ireplace(array('{address}'), array($widget['address']), $widget['lightbox_header']);
|
517 |
-
$out .= '<div class="gmw-header">' . wpautop(do_shortcode($tmp)) . '</div>';
|
518 |
-
}
|
519 |
-
$out .= '<div class="gmw-map"></div>';
|
520 |
-
if ($widget['lightbox_footer']) {
|
521 |
-
$tmp = str_ireplace(array('{address}'), array($widget['address']), $widget['lightbox_footer']);
|
522 |
-
$out .= '<div class="gmw-footer">' . wpautop(do_shortcode($tmp)) . '</div>';
|
523 |
-
}
|
524 |
-
$out .= "</div>\n";
|
525 |
-
} // foreach $widgets
|
526 |
-
|
527 |
-
echo $out;
|
528 |
} // dialogs_markup
|
529 |
|
530 |
|
@@ -599,6 +605,11 @@ class GMW {
|
|
599 |
$options = GMW::get_options();
|
600 |
$notice = false;
|
601 |
|
|
|
|
|
|
|
|
|
|
|
602 |
// license expire notice is always shown
|
603 |
if ((!$notice && GMW::is_activated() && empty($options['dismiss_notice_license_expires']) &&
|
604 |
(strtotime($options['license_expires']) - time() < DAY_IN_SECONDS * 3)) ||
|
@@ -679,7 +690,7 @@ class GMW {
|
|
679 |
|
680 |
echo '<br><a href="' . esc_url($buy_url) . '" style="vertical-align: baseline; margin-top: 15px;" class="button-primary">' . $button_text . '</a>';
|
681 |
if (!GMW::is_plugin_admin_page('settings')) {
|
682 |
-
echo ' <a href="' . esc_url($dismiss_url) . '" class="">' . __('I will pay the full price ($
|
683 |
}
|
684 |
echo '</p></div>';
|
685 |
} // notice_license_expires
|
@@ -735,62 +746,81 @@ class GMW {
|
|
735 |
static function register_scripts() {
|
736 |
$options = GMW::get_options();
|
737 |
|
738 |
-
wp_register_style('gmw',
|
739 |
|
740 |
if ($options['include_jquery']) {
|
741 |
-
wp_register_script('gmw-colorbox',
|
742 |
-
wp_register_script('gmw',
|
743 |
} else {
|
744 |
-
wp_register_script('gmw-colorbox',
|
745 |
-
wp_register_script('gmw',
|
746 |
}
|
747 |
} // register_scripts
|
748 |
|
749 |
|
750 |
// enqueue CSS and JS scripts in admin
|
751 |
static function admin_enqueue_scripts() {
|
752 |
-
global $wp_customize;
|
753 |
$options = GMW::get_options();
|
754 |
-
|
755 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
756 |
wp_enqueue_script('jquery-ui-tabs');
|
757 |
wp_enqueue_script('jquery-ui-dialog');
|
758 |
wp_enqueue_script('wp-color-picker');
|
759 |
wp_enqueue_script('wp-pointer');
|
760 |
-
wp_enqueue_script('gmw-cookie',
|
761 |
if (GMW::is_activated()) {
|
762 |
wp_enqueue_script('gmw-gmap', '//maps.google.com/maps/api/js', array(), GMW::$version, true);
|
763 |
}
|
764 |
-
wp_enqueue_script('gmw-select2',
|
765 |
-
wp_enqueue_script('gmw-admin',
|
766 |
|
767 |
wp_enqueue_style('wp-jquery-ui-dialog');
|
768 |
wp_enqueue_style('wp-color-picker');
|
769 |
wp_enqueue_style('wp-pointer');
|
770 |
-
wp_enqueue_style('gmw-select2',
|
771 |
-
wp_enqueue_style('gmw-admin',
|
772 |
-
|
773 |
-
$js_localize = array('activate_ok' => __('Superb! PRO features are active ;)', 'google-maps-widget'),
|
774 |
-
'dialog_map_title' => __('Pick an address by drag & dropping the pin', 'google-maps-widget'),
|
775 |
-
'undocumented_error' => __('An undocumented error has occured. Please refresh the page and try again.', 'google-maps-widget'),
|
776 |
-
'bad_api_key' => __('The API key format does not look right. Please double-check it.', 'google-maps-widget'),
|
777 |
-
'dialog_promo_title' => '<img alt="' . __('Google Maps Widget PRO', 'google-maps-widget') . '" title="' . __('Google Maps Widget PRO', 'google-maps-widget') . '" src="' . plugins_url('/images/gmw-logo-pro-dialog.png', __FILE__) . '">',
|
778 |
-
'dialog_pins_title' => __('Pins Library', 'google-maps-widget'),
|
779 |
-
'plugin_name' => GMW::is_activated()? __('Google Maps Widget PRO', 'google-maps-widget'): __('Google Maps Widget', 'google-maps-widget'),
|
780 |
-
'id_base' => 'googlemapswidget',
|
781 |
-
'map_picker_not_active' => __('Drag&drop address picking interface is a PRO feature. Interested in switching to PRO?', 'google-maps-widget'),
|
782 |
-
'map' => false,
|
783 |
-
'marker' => false,
|
784 |
-
'trial_ok' => __('Your trial has been activated. Enjoy all PRO features for 7 days.' . "\n" . 'Check your email for a DISCOUNT coupon ;)', 'google-maps-widget'),
|
785 |
-
'settings_url' => admin_url('options-general.php?page=gmw_options'),
|
786 |
-
'pins_library' => plugins_url('/images/pins/', __FILE__),
|
787 |
-
'disable_tooltips' => $options['disable_tooltips'],
|
788 |
-
'is_activated' => GMW::is_activated(),
|
789 |
-
'nonce_test_api_key' => wp_create_nonce('gmw_test_api_key'),
|
790 |
-
'nonce_get_trial' => wp_create_nonce('gmw_get_trial'),
|
791 |
-
'nonce_activate_license_key' => wp_create_nonce('gmw_activate_license_key'));
|
792 |
wp_localize_script('gmw-admin', 'gmw', $js_localize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
793 |
} // if
|
|
|
|
|
|
|
|
|
|
|
794 |
} // admin_enqueue_scripts
|
795 |
|
796 |
|
@@ -853,7 +883,7 @@ class GMW {
|
|
853 |
$options = GMW::get_options();
|
854 |
$promo_delta = 3*60*60;
|
855 |
|
856 |
-
if (
|
857 |
$current_user = wp_get_current_user();
|
858 |
if (empty($current_user->user_firstname)) {
|
859 |
$name = $current_user->display_name;
|
@@ -875,25 +905,25 @@ class GMW {
|
|
875 |
$out .= '</div>'; // header
|
876 |
|
877 |
$out .= '<div class="gmw-promo-box gmw-promo-box-lifetime gmw_goto_activation gmw-promo-box-hover">
|
878 |
-
<div class="gmw-promo-icon"><img src="' . GMW_PLUGIN_URL . '
|
879 |
<div class="gmw-promo-description"><h3>Unlimited Lifetime License</h3><br>
|
880 |
<span>Unlimited sites + lifetime support & upgrades</span></div>';
|
881 |
if (current_time('timestamp') - $options['first_install'] < $promo_delta) {
|
882 |
$out .= '<div class="gmw-promo-button gmw-promo-button-extra"><a href="http://www.gmapswidget.com/buy/?p=pro-welcome&r=welcome-GMW+v' . GMW::$version . '" data-noprevent="1" target="_blank">only $19</a><span>discount: 25%</span></div>';
|
883 |
} elseif ($options['license_expires'] >= date('Y-m-d') && $options['license_type'] == 'trial') {
|
884 |
-
$out .= '<div class="gmw-promo-button gmw-promo-button-extra"><a href="http://www.gmapswidget.com/buy/?p=pro-trial&r=
|
885 |
} else {
|
886 |
$out .= '<div class="gmw-promo-button"><a href="http://www.gmapswidget.com/buy/?p=pro-unlimited&r=GMW+v' . GMW::$version . '" data-noprevent="1" target="_blank">BUY $25</a></div>';
|
887 |
}
|
888 |
$out .= '</div>';
|
889 |
$out .= '<div class="gmw-promo-box gmw-promo-box-yearly gmw_goto_activation">
|
890 |
-
<div class="gmw-promo-icon"><img src="' . GMW_PLUGIN_URL . '
|
891 |
<div class="gmw-promo-description"><h3>1 Year License</h3><br>
|
892 |
<span>Unlimited sites + 1 year of support & upgrades</span></div>
|
893 |
<div class="gmw-promo-button"><a href="http://www.gmapswidget.com/buy/?p=yearly&r=GMW+v' . GMW::$version . '" data-noprevent="1" target="_blank">$11 /year</a></div>
|
894 |
</div>';
|
895 |
$out .= '<div class="gmw-promo-box gmw-promo-box-trial gmw_goto_trial">
|
896 |
-
<div class="gmw-promo-icon"><img src="' . GMW_PLUGIN_URL . '
|
897 |
<div class="gmw-promo-description"><h3>7 Days Free Trial</h3><br>
|
898 |
<span>Still on the fence? Test PRO for free.</span></div>
|
899 |
<div class="gmw-promo-button"><a href="#">Start</a></div>
|
@@ -1040,9 +1070,9 @@ class GMW {
|
|
1040 |
|
1041 |
echo '<div class="wrap gmw-options">';
|
1042 |
if (GMW::is_activated()) {
|
1043 |
-
echo '<h1><img alt="' . __('Google Maps Widget PRO', 'google-maps-widget') . '" title="' . __('Google Maps Widget PRO', 'google-maps-widget') . '" height="55" src="' .
|
1044 |
} else {
|
1045 |
-
echo '<h1><img alt="' . __('Google Maps Widget', 'google-maps-widget') . '" title="' . __('Google Maps Widget', 'google-maps-widget') . '" height="55" src="' .
|
1046 |
}
|
1047 |
|
1048 |
echo '<form method="post" action="options.php" enctype="multipart/form-data">';
|
@@ -1388,17 +1418,6 @@ class GMW {
|
|
1388 |
public static function maybe_upgrade() {
|
1389 |
$options = GMW::get_options();
|
1390 |
|
1391 |
-
// pro was active with old key, recheck
|
1392 |
-
if (!empty($options['activation_code']) && strlen($options['activation_code']) == 6 && $options['license_active'] === '') {
|
1393 |
-
$tmp = GMW::validate_activation_code($options['activation_code']);
|
1394 |
-
if ($tmp['success']) {
|
1395 |
-
$update['license_type'] = $tmp['license_type'];
|
1396 |
-
$update['license_expires'] = $tmp['license_expires'];
|
1397 |
-
$update['license_active'] = $tmp['license_active'];
|
1398 |
-
GMW::set_options($update);
|
1399 |
-
}
|
1400 |
-
} // old license upgrade
|
1401 |
-
|
1402 |
if (!isset($options['first_version']) || !isset($options['first_install'])) {
|
1403 |
$update = array();
|
1404 |
$update['first_version'] = GMW::$version;
|
4 |
Plugin URI: http://www.gmapswidget.com/
|
5 |
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available as an image replacement or in a lightbox. Includes shortcode support and numerous options.
|
6 |
Author: Web factory Ltd
|
7 |
+
Version: 3.30
|
8 |
Author URI: http://www.webfactoryltd.com/
|
9 |
Text Domain: google-maps-widget
|
10 |
Domain Path: lang
|
42 |
require_once GMW_PLUGIN_DIR . 'gmw-map-styles.php';
|
43 |
require_once GMW_PLUGIN_DIR . 'gmw-export-import.php';
|
44 |
if (file_exists(GMW_PLUGIN_DIR . 'gmw-pro-license.php')) {
|
45 |
+
require_once GMW_PLUGIN_DIR . 'gmw-pro-license.php';
|
46 |
}
|
47 |
|
|
|
48 |
class GMW {
|
49 |
+
static $version = '3.30';
|
50 |
static $options = 'gmw_options';
|
51 |
static $licensing_servers = array('http://license.gmapswidget.com/', 'http://license2.gmapswidget.com/');
|
52 |
|
55 |
static function init() {
|
56 |
if (is_admin()) {
|
57 |
// check if minimal required WP version is present
|
58 |
+
if (false === GMW::check_wp_version(4.0)) {
|
59 |
return false;
|
60 |
}
|
61 |
|
68 |
add_filter('plugin_row_meta', array('GMW', 'plugin_meta_links'), 10, 2);
|
69 |
|
70 |
// enqueue admin scripts
|
71 |
+
add_action('admin_enqueue_scripts', array('GMW', 'admin_enqueue_scripts'), 100);
|
72 |
add_action('customize_controls_enqueue_scripts', array('GMW', 'admin_enqueue_scripts'));
|
73 |
|
74 |
// JS dialog markup
|
103 |
|
104 |
// add shortcode support
|
105 |
GMW::add_shortcodes();
|
106 |
+
|
107 |
+
// PRO license related functions
|
108 |
+
if (is_callable(array('GMW_license', 'init'))) {
|
109 |
+
GMW_license::init();
|
110 |
+
}
|
111 |
} // init
|
112 |
|
113 |
|
319 |
|
320 |
// display error message if WP version is too low
|
321 |
static function notice_min_version_error() {
|
322 |
+
echo '<div class="error"><p>' . sprintf(__('Google Maps Widget <b>requires WordPress version 4.0</b> or higher to function properly. You are using WordPress version %s. Please <a href="%s">update it</a>.', 'google-maps-widget'), get_bloginfo('version'), admin_url('update-core.php')) . '</p></div>';
|
323 |
} // notice_min_version_error
|
324 |
|
325 |
|
479 |
|
480 |
// print dialogs markup in footer
|
481 |
static function dialogs_markup() {
|
482 |
+
$out = '';
|
483 |
+
$js_vars = array();
|
484 |
+
$options = GMW::get_options();
|
485 |
+
$measure_title = array('dark', 'sketchtoon', 'darkrimmed', 'fancyoverlay', 'rounded-white', 'noimage');
|
486 |
+
|
487 |
+
if (empty(GoogleMapsWidget::$widgets)) {
|
488 |
+
return;
|
489 |
+
}
|
490 |
+
|
491 |
+
// add CSS and JS in footer
|
492 |
+
$js_vars['track_ga'] = $options['track_ga'];
|
493 |
+
if ($options['include_lightbox_css']) {
|
494 |
+
$js_vars['colorbox_css'] = GMW_PLUGIN_URL . 'css/gmw.css' . '?ver=' . GMW::$version;
|
495 |
+
} else {
|
496 |
+
$js_vars['colorbox_css'] = false;
|
497 |
+
}
|
498 |
+
if ($options['include_lightbox_js']) {
|
499 |
+
wp_enqueue_script('gmw-colorbox');
|
500 |
+
}
|
501 |
+
wp_enqueue_script('gmw');
|
502 |
+
wp_localize_script('gmw', 'gmw_data', $js_vars);
|
503 |
+
|
504 |
+
foreach (GoogleMapsWidget::$widgets as $widget) {
|
505 |
+
$map_url = GMW::build_lightbox_url($widget);
|
506 |
+
|
507 |
+
if ($widget['lightbox_fullscreen']) {
|
508 |
+
$widget['lightbox_width'] = '100%';
|
509 |
+
$widget['lightbox_height'] = '100%';
|
510 |
}
|
511 |
|
512 |
+
$out .= '<div class="gmw-dialog" style="display: none;" data-map-height="' . $widget['lightbox_height'] . '"
|
513 |
+
data-map-width="' . $widget['lightbox_width'] . '" data-thumb-height="' . $widget['thumb_height'] . '"
|
514 |
+
data-thumb-width="' . $widget['thumb_width'] . '" data-map-skin="' . $widget['lightbox_skin'] . '"
|
515 |
+
data-map-iframe-url="' . $map_url . '" id="gmw-dialog-' . $widget['id'] . '" title="' . esc_attr($widget['title']) . '"
|
516 |
+
data-close-button="' . (int) in_array('close_button', $widget['lightbox_feature']) . '"
|
517 |
+
data-show-title="' . (int) in_array('title', $widget['lightbox_feature']) . '"
|
518 |
+
data-measure-title="' . (int) in_array($widget['lightbox_skin'], $measure_title) . '"
|
519 |
+
data-close-overlay="' . (int) in_array('overlay_close', $widget['lightbox_feature']) . '"
|
520 |
+
data-close-esc="' . (int) in_array('esc_close', $widget['lightbox_feature']) . '">';
|
521 |
+
if ($widget['lightbox_header']) {
|
522 |
+
$tmp = str_ireplace(array('{address}'), array($widget['address']), $widget['lightbox_header']);
|
523 |
+
$out .= '<div class="gmw-header">' . wpautop(do_shortcode($tmp)) . '</div>';
|
524 |
}
|
525 |
+
$out .= '<div class="gmw-map"></div>';
|
526 |
+
if ($widget['lightbox_footer']) {
|
527 |
+
$tmp = str_ireplace(array('{address}'), array($widget['address']), $widget['lightbox_footer']);
|
528 |
+
$out .= '<div class="gmw-footer">' . wpautop(do_shortcode($tmp)) . '</div>';
|
529 |
}
|
530 |
+
$out .= "</div>\n";
|
531 |
+
} // foreach $widgets
|
532 |
+
|
533 |
+
echo $out;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
534 |
} // dialogs_markup
|
535 |
|
536 |
|
605 |
$options = GMW::get_options();
|
606 |
$notice = false;
|
607 |
|
608 |
+
$tmp = apply_filters('gmw_add_notices', null);
|
609 |
+
if ($tmp === false) {
|
610 |
+
return;
|
611 |
+
}
|
612 |
+
|
613 |
// license expire notice is always shown
|
614 |
if ((!$notice && GMW::is_activated() && empty($options['dismiss_notice_license_expires']) &&
|
615 |
(strtotime($options['license_expires']) - time() < DAY_IN_SECONDS * 3)) ||
|
690 |
|
691 |
echo '<br><a href="' . esc_url($buy_url) . '" style="vertical-align: baseline; margin-top: 15px;" class="button-primary">' . $button_text . '</a>';
|
692 |
if (!GMW::is_plugin_admin_page('settings')) {
|
693 |
+
echo ' <a href="' . esc_url($dismiss_url) . '" class="">' . __('I will pay the full price ($25) later', 'google-maps-widget') . '</a>';
|
694 |
}
|
695 |
echo '</p></div>';
|
696 |
} // notice_license_expires
|
746 |
static function register_scripts() {
|
747 |
$options = GMW::get_options();
|
748 |
|
749 |
+
wp_register_style('gmw', GMW_PLUGIN_URL . 'css/gmw.css', array(), GMW::$version);
|
750 |
|
751 |
if ($options['include_jquery']) {
|
752 |
+
wp_register_script('gmw-colorbox', GMW_PLUGIN_URL . 'js/jquery.colorbox.min.js', array('jquery'), GMW::$version, true);
|
753 |
+
wp_register_script('gmw', GMW_PLUGIN_URL . 'js/gmw.js', array('jquery'), GMW::$version, true);
|
754 |
} else {
|
755 |
+
wp_register_script('gmw-colorbox', GMW_PLUGIN_URL . 'js/jquery.colorbox.min.js', array(), GMW::$version, true);
|
756 |
+
wp_register_script('gmw', GMW_PLUGIN_URL . 'js/gmw.js', array(), GMW::$version, true);
|
757 |
}
|
758 |
} // register_scripts
|
759 |
|
760 |
|
761 |
// enqueue CSS and JS scripts in admin
|
762 |
static function admin_enqueue_scripts() {
|
|
|
763 |
$options = GMW::get_options();
|
764 |
+
|
765 |
+
$js_localize = array('activate_ok' => __('Superb! PRO features are active ;)', 'google-maps-widget'),
|
766 |
+
'dialog_map_title' => __('Pick an address by drag & dropping the pin', 'google-maps-widget'),
|
767 |
+
'undocumented_error' => __('An undocumented error has occured. Please refresh the page and try again.', 'google-maps-widget'),
|
768 |
+
'bad_api_key' => __('The API key format does not look right. Please double-check it.', 'google-maps-widget'),
|
769 |
+
'dialog_promo_title' => '<img alt="' . __('Google Maps Widget PRO', 'google-maps-widget') . '" title="' . __('Google Maps Widget PRO', 'google-maps-widget') . '" src="' . GMW_PLUGIN_URL . 'images/gmw-logo-pro-dialog.png' . '">',
|
770 |
+
'dialog_pins_title' => __('Pins Library', 'google-maps-widget'),
|
771 |
+
'plugin_name' => GMW::is_activated()? __('Google Maps Widget PRO', 'google-maps-widget'): __('Google Maps Widget', 'google-maps-widget'),
|
772 |
+
'id_base' => 'googlemapswidget',
|
773 |
+
'map_picker_not_active' => __('Drag&drop address picking interface is a PRO feature. Interested in switching to PRO?', 'google-maps-widget'),
|
774 |
+
'customizer_address_picker' => __('At the moment, the address picker is not available in the theme customizer. Please use it in the admin widget GUI.', 'google-maps-widget'),
|
775 |
+
'customizer_pins_picker' => __('At the moment, the pins library is not available in the theme customizer. Please use it in the admin widget GUI.', 'google-maps-widget'),
|
776 |
+
'customizer_pro_dialog' => __('To see what the PRO version offers please open GMW settings in the admin.', 'google-maps-widget'),
|
777 |
+
'map' => false,
|
778 |
+
'marker' => false,
|
779 |
+
'trial_ok' => __('Your trial has been activated. Enjoy all PRO features for 7 days.' . "\n" . 'Check your email for a DISCOUNT coupon ;)', 'google-maps-widget'),
|
780 |
+
'settings_url' => admin_url('options-general.php?page=gmw_options'),
|
781 |
+
'pins_library' => GMW_PLUGIN_URL . 'images/pins/',
|
782 |
+
'disable_tooltips' => $options['disable_tooltips'],
|
783 |
+
'is_activated' => GMW::is_activated(),
|
784 |
+
'nonce_test_api_key' => wp_create_nonce('gmw_test_api_key'),
|
785 |
+
'nonce_get_trial' => wp_create_nonce('gmw_get_trial'),
|
786 |
+
'nonce_activate_license_key' => wp_create_nonce('gmw_activate_license_key'),
|
787 |
+
'deactivate_confirmation' => __('Are you sure you want to deactivate ' . (GMW::is_activated()? 'Google Maps Widget PRO': 'Google Maps Widget') . '?' . "\n" . 'All maps will be removed from the site. If you are removing it because of a problem please contact our support. They will be more than glad to help.', 'google-maps-widget'));
|
788 |
+
|
789 |
+
if (GMW::is_plugin_admin_page('widgets') || GMW::is_plugin_admin_page('settings') || is_customize_preview()) {
|
790 |
wp_enqueue_script('jquery-ui-tabs');
|
791 |
wp_enqueue_script('jquery-ui-dialog');
|
792 |
wp_enqueue_script('wp-color-picker');
|
793 |
wp_enqueue_script('wp-pointer');
|
794 |
+
wp_enqueue_script('gmw-cookie', GMW_PLUGIN_URL . 'js/jquery.cookie.js', array('jquery'), GMW::$version, true);
|
795 |
if (GMW::is_activated()) {
|
796 |
wp_enqueue_script('gmw-gmap', '//maps.google.com/maps/api/js', array(), GMW::$version, true);
|
797 |
}
|
798 |
+
wp_enqueue_script('gmw-select2', GMW_PLUGIN_URL . 'js/select2.min.js', array('jquery'), GMW::$version, true);
|
799 |
+
wp_enqueue_script('gmw-admin', GMW_PLUGIN_URL . 'js/gmw-admin.js', array('jquery'), GMW::$version, true);
|
800 |
|
801 |
wp_enqueue_style('wp-jquery-ui-dialog');
|
802 |
wp_enqueue_style('wp-color-picker');
|
803 |
wp_enqueue_style('wp-pointer');
|
804 |
+
wp_enqueue_style('gmw-select2', GMW_PLUGIN_URL . 'css/select2.min.css', array(), GMW::$version);
|
805 |
+
wp_enqueue_style('gmw-admin', GMW_PLUGIN_URL . 'css/gmw-admin.css', array(), GMW::$version);
|
806 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
807 |
wp_localize_script('gmw-admin', 'gmw', $js_localize);
|
808 |
+
|
809 |
+
// fix for agressive plugins
|
810 |
+
wp_dequeue_style('uiStyleSheet');
|
811 |
+
wp_dequeue_style('wpcufpnAdmin' );
|
812 |
+
wp_dequeue_style('unifStyleSheet' );
|
813 |
+
wp_dequeue_style('wpcufpn_codemirror');
|
814 |
+
wp_dequeue_style('wpcufpn_codemirrorTheme');
|
815 |
+
wp_dequeue_style('collapse-admin-css');
|
816 |
+
wp_dequeue_style('jquery-ui-css');
|
817 |
+
wp_dequeue_style('tribe-common-admin');
|
818 |
} // if
|
819 |
+
|
820 |
+
if (GMW::is_plugin_admin_page('plugins')) {
|
821 |
+
wp_enqueue_script('gmw-admin-plugins', GMW_PLUGIN_URL . 'js/gmw-admin-plugins.js', array('jquery'), GMW::$version, true);
|
822 |
+
wp_localize_script('gmw-admin-plugins', 'gmw', $js_localize);
|
823 |
+
}
|
824 |
} // admin_enqueue_scripts
|
825 |
|
826 |
|
883 |
$options = GMW::get_options();
|
884 |
$promo_delta = 3*60*60;
|
885 |
|
886 |
+
if (GMW::is_plugin_admin_page('widgets') || GMW::is_plugin_admin_page('settings')) {
|
887 |
$current_user = wp_get_current_user();
|
888 |
if (empty($current_user->user_firstname)) {
|
889 |
$name = $current_user->display_name;
|
905 |
$out .= '</div>'; // header
|
906 |
|
907 |
$out .= '<div class="gmw-promo-box gmw-promo-box-lifetime gmw_goto_activation gmw-promo-box-hover">
|
908 |
+
<div class="gmw-promo-icon"><img src="' . GMW_PLUGIN_URL . 'images/icon-unlimited.png" alt="Unlimited Lifetime License" title="Unlimited Lifetime License"></div>
|
909 |
<div class="gmw-promo-description"><h3>Unlimited Lifetime License</h3><br>
|
910 |
<span>Unlimited sites + lifetime support & upgrades</span></div>';
|
911 |
if (current_time('timestamp') - $options['first_install'] < $promo_delta) {
|
912 |
$out .= '<div class="gmw-promo-button gmw-promo-button-extra"><a href="http://www.gmapswidget.com/buy/?p=pro-welcome&r=welcome-GMW+v' . GMW::$version . '" data-noprevent="1" target="_blank">only $19</a><span>discount: 25%</span></div>';
|
913 |
} elseif ($options['license_expires'] >= date('Y-m-d') && $options['license_type'] == 'trial') {
|
914 |
+
$out .= '<div class="gmw-promo-button gmw-promo-button-extra"><a href="http://www.gmapswidget.com/buy/?p=pro-trial&r=trial-GMW+v' . GMW::$version . '+' . $options['activation_code'] . '" data-noprevent="1" target="_blank">only $19</a><span>discount: 25%</span></div>';
|
915 |
} else {
|
916 |
$out .= '<div class="gmw-promo-button"><a href="http://www.gmapswidget.com/buy/?p=pro-unlimited&r=GMW+v' . GMW::$version . '" data-noprevent="1" target="_blank">BUY $25</a></div>';
|
917 |
}
|
918 |
$out .= '</div>';
|
919 |
$out .= '<div class="gmw-promo-box gmw-promo-box-yearly gmw_goto_activation">
|
920 |
+
<div class="gmw-promo-icon"><img src="' . GMW_PLUGIN_URL . 'images/icon-yearly.png" alt="Yearly License" title="Yearly License"></div>
|
921 |
<div class="gmw-promo-description"><h3>1 Year License</h3><br>
|
922 |
<span>Unlimited sites + 1 year of support & upgrades</span></div>
|
923 |
<div class="gmw-promo-button"><a href="http://www.gmapswidget.com/buy/?p=yearly&r=GMW+v' . GMW::$version . '" data-noprevent="1" target="_blank">$11 /year</a></div>
|
924 |
</div>';
|
925 |
$out .= '<div class="gmw-promo-box gmw-promo-box-trial gmw_goto_trial">
|
926 |
+
<div class="gmw-promo-icon"><img src="' . GMW_PLUGIN_URL . 'images/icon-trial.png" alt="7 Days Free Trial License" title="7 Days Free Trial License"></div>
|
927 |
<div class="gmw-promo-description"><h3>7 Days Free Trial</h3><br>
|
928 |
<span>Still on the fence? Test PRO for free.</span></div>
|
929 |
<div class="gmw-promo-button"><a href="#">Start</a></div>
|
1070 |
|
1071 |
echo '<div class="wrap gmw-options">';
|
1072 |
if (GMW::is_activated()) {
|
1073 |
+
echo '<h1><img alt="' . __('Google Maps Widget PRO', 'google-maps-widget') . '" title="' . __('Google Maps Widget PRO', 'google-maps-widget') . '" height="55" src="' . GMW_PLUGIN_URL . 'images/gmw-logo-pro.png"></h1>';
|
1074 |
} else {
|
1075 |
+
echo '<h1><img alt="' . __('Google Maps Widget', 'google-maps-widget') . '" title="' . __('Google Maps Widget', 'google-maps-widget') . '" height="55" src="' . GMW_PLUGIN_URL . 'images/gmw-logo.png"></h1>';
|
1076 |
}
|
1077 |
|
1078 |
echo '<form method="post" action="options.php" enctype="multipart/form-data">';
|
1418 |
public static function maybe_upgrade() {
|
1419 |
$options = GMW::get_options();
|
1420 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1421 |
if (!isset($options['first_version']) || !isset($options['first_install'])) {
|
1422 |
$update = array();
|
1423 |
$update['first_version'] = GMW::$version;
|
js/gmw-admin-plugins.js
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Google Maps Widget
|
3 |
+
* (c) Web factory Ltd, 2012 - 2016
|
4 |
+
*/
|
5 |
+
|
6 |
+
|
7 |
+
jQuery(function($) {
|
8 |
+
// ask users to confirm plugin deactivation
|
9 |
+
$('#the-list tr[data-slug="google-maps-widget"] span.deactivate a').on('click', function(e) {
|
10 |
+
if (confirm(gmw.deactivate_confirmation)) {
|
11 |
+
|
12 |
+
return true;
|
13 |
+
} else {
|
14 |
+
e.preventDefault();
|
15 |
+
return false;
|
16 |
+
}
|
17 |
+
}); // confirm plugin deactivation
|
18 |
+
|
19 |
+
// branding for widget title
|
20 |
+
if (gmw.is_activated) {
|
21 |
+
title_tmp = $('#the-list tr[data-slug="google-maps-widget"] .plugin-title strong').html();
|
22 |
+
if (title_tmp) {
|
23 |
+
title_tmp += ' <span style="color: #d54e21;">PRO</span>';
|
24 |
+
$('#the-list tr[data-slug="google-maps-widget"] .plugin-title strong').html(title_tmp);
|
25 |
+
}
|
26 |
+
} // branding if PRO
|
27 |
+
}); // onload
|
js/gmw-admin.js
CHANGED
@@ -93,7 +93,7 @@ jQuery(function($) {
|
|
93 |
|
94 |
// init JS UI for an individual GMW
|
95 |
function gmw_init_widget_ui(widget) {
|
96 |
-
$('.gmw-colorpicker', widget).wpColorPicker();
|
97 |
$('.gmw-select2', widget).select2({ minimumResultsForSearch: 100, width: '331px' });
|
98 |
|
99 |
// init tabs
|
@@ -133,6 +133,11 @@ jQuery(function($) {
|
|
133 |
$('.open_pins_library', widget).on('click', function(e) {
|
134 |
e.preventDefault();
|
135 |
|
|
|
|
|
|
|
|
|
|
|
136 |
gmw_open_pins_library_dialog(this);
|
137 |
|
138 |
return false;
|
@@ -152,7 +157,12 @@ jQuery(function($) {
|
|
152 |
// open address picking map dialog
|
153 |
$('a.gmw-pick-address', widget).on('click', function(e) {
|
154 |
e.preventDefault();
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
156 |
gmw_open_map_dialog($(this).parents('div.widget'), $(this).data('target'));
|
157 |
|
158 |
return false;
|
@@ -175,7 +185,7 @@ jQuery(function($) {
|
|
175 |
});
|
176 |
|
177 |
// show help when field is focused
|
178 |
-
$('input[type=text], input[type=number], input[type=url], select, textarea', widget).on('focus', function(e) {
|
179 |
gmw_show_pointer(this, widget, true);
|
180 |
|
181 |
}).on('focusout', function(e) {
|
@@ -490,6 +500,11 @@ jQuery(function($) {
|
|
490 |
|
491 |
// open promo/activation dialog
|
492 |
function gmw_open_promo_dialog() {
|
|
|
|
|
|
|
|
|
|
|
493 |
$('.gmw_promo_dialog_screen').hide();
|
494 |
$('#gmw_dialog_intro').show();
|
495 |
|
93 |
|
94 |
// init JS UI for an individual GMW
|
95 |
function gmw_init_widget_ui(widget) {
|
96 |
+
$('.gmw-colorpicker', widget).wpColorPicker({ change: function(picker, event) { $('.gmw-colorpicker', widget).val(event.color.toString()).trigger('change'); } });
|
97 |
$('.gmw-select2', widget).select2({ minimumResultsForSearch: 100, width: '331px' });
|
98 |
|
99 |
// init tabs
|
133 |
$('.open_pins_library', widget).on('click', function(e) {
|
134 |
e.preventDefault();
|
135 |
|
136 |
+
if (typeof wp !== 'undefined' && wp.customize) {
|
137 |
+
alert(gmw.customizer_pins_picker);
|
138 |
+
return false;
|
139 |
+
}
|
140 |
+
|
141 |
gmw_open_pins_library_dialog(this);
|
142 |
|
143 |
return false;
|
157 |
// open address picking map dialog
|
158 |
$('a.gmw-pick-address', widget).on('click', function(e) {
|
159 |
e.preventDefault();
|
160 |
+
|
161 |
+
if (typeof wp !== 'undefined' && wp.customize) {
|
162 |
+
alert(gmw.customizer_address_picker);
|
163 |
+
return false;
|
164 |
+
}
|
165 |
+
|
166 |
gmw_open_map_dialog($(this).parents('div.widget'), $(this).data('target'));
|
167 |
|
168 |
return false;
|
185 |
});
|
186 |
|
187 |
// show help when field is focused
|
188 |
+
$('input[type="text"], input[type="number"], input[type="url"], select, textarea', widget).on('focus', function(e) {
|
189 |
gmw_show_pointer(this, widget, true);
|
190 |
|
191 |
}).on('focusout', function(e) {
|
500 |
|
501 |
// open promo/activation dialog
|
502 |
function gmw_open_promo_dialog() {
|
503 |
+
if (typeof wp !== 'undefined' && wp.customize) {
|
504 |
+
alert(gmw.customizer_pro_dialog);
|
505 |
+
return false;
|
506 |
+
}
|
507 |
+
|
508 |
$('.gmw_promo_dialog_screen').hide();
|
509 |
$('#gmw_dialog_intro').show();
|
510 |
|
js/gmw.js
CHANGED
@@ -21,6 +21,7 @@ jQuery(function($) {
|
|
21 |
map_skin = dialog.data('map-skin');
|
22 |
close_button = Boolean(dialog.data('close-button'));
|
23 |
show_title = Boolean(dialog.data('show-title'));
|
|
|
24 |
close_overlay = Boolean(dialog.data('close-overlay'));
|
25 |
close_esc = Boolean(dialog.data('close-esc'));
|
26 |
|
@@ -46,7 +47,7 @@ jQuery(function($) {
|
|
46 |
}
|
47 |
|
48 |
content = $(dialog.html());
|
49 |
-
content.filter('.gmw-map').html('<iframe width="100%" height="100%" src="' + map_url + '" allowfullscreen></iframe>');
|
50 |
|
51 |
$.colorbox({ html: content,
|
52 |
title: map_title,
|
@@ -122,15 +123,17 @@ jQuery(function($) {
|
|
122 |
$(document).bind('cbox_complete', function(e){
|
123 |
// test if this is a GMW colorbox
|
124 |
colorbox = e.currentTarget.activeElement;
|
125 |
-
if ($('div[class^=gmw-]', colorbox).length === 0) {
|
126 |
return;
|
127 |
}
|
128 |
|
|
|
|
|
129 |
if ($('#cboxTitle', colorbox).html() === '') {
|
130 |
$('#cboxTitle').hide();
|
131 |
title_height = 0;
|
132 |
} else {
|
133 |
-
title_height = parseInt(0 + $('#cboxTitle', colorbox).outerHeight(true), 10)
|
134 |
}
|
135 |
|
136 |
// adjust iframe size
|
21 |
map_skin = dialog.data('map-skin');
|
22 |
close_button = Boolean(dialog.data('close-button'));
|
23 |
show_title = Boolean(dialog.data('show-title'));
|
24 |
+
measure_title = parseInt(dialog.data('measure-title'), 10);
|
25 |
close_overlay = Boolean(dialog.data('close-overlay'));
|
26 |
close_esc = Boolean(dialog.data('close-esc'));
|
27 |
|
47 |
}
|
48 |
|
49 |
content = $(dialog.html());
|
50 |
+
content.filter('.gmw-map').html('<iframe data-measure-title="' + measure_title + '" width="100%" height="100%" src="' + map_url + '" allowfullscreen></iframe>');
|
51 |
|
52 |
$.colorbox({ html: content,
|
53 |
title: map_title,
|
123 |
$(document).bind('cbox_complete', function(e){
|
124 |
// test if this is a GMW colorbox
|
125 |
colorbox = e.currentTarget.activeElement;
|
126 |
+
if ($('div[class^="gmw-"]', colorbox).length === 0) {
|
127 |
return;
|
128 |
}
|
129 |
|
130 |
+
measure_title = $('iframe', colorbox).data('measure-title');
|
131 |
+
|
132 |
if ($('#cboxTitle', colorbox).html() === '') {
|
133 |
$('#cboxTitle').hide();
|
134 |
title_height = 0;
|
135 |
} else {
|
136 |
+
title_height = measure_title * parseInt(0 + $('#cboxTitle', colorbox).outerHeight(true), 10);
|
137 |
}
|
138 |
|
139 |
// adjust iframe size
|
readme.txt
CHANGED
@@ -4,9 +4,9 @@ Tags: address, directions, gmaps, google maps shortcode, google maps, google map
|
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?business=gordan@webfactoryltd.com&cmd=_xclick¤cy_code=USD&amount=&item_name=Google%20Maps%20Widget%20Donation
|
5 |
License: GPLv2 or later
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
-
Requires at least:
|
8 |
-
Tested up to: 4.
|
9 |
-
Stable tag: 3.
|
10 |
|
11 |
Displays a single image, super-fast loading Google map in a widget. A larger map with all interactive features is available on click in a lightbox.
|
12 |
|
@@ -52,7 +52,7 @@ http://www.youtube.com/watch?v=y1siX9ha7Pw&hd=1
|
|
52 |
* by using the _[gmw id="#"]_ shortcode you can display the map in any page, post, or custom post type (this is a PRO feature)
|
53 |
|
54 |
|
55 |
-
> **PRO** version offers more than 50 extra features including extra pins, skins, export & import features, Google Analytics integration and premium support. Install the plugin and
|
56 |
|
57 |
|
58 |
**What others say about the plugin**
|
@@ -123,7 +123,7 @@ Write the address differently, or more precisely. Make sure you enter the street
|
|
123 |
|
124 |
We understand that creating an API key is frustrating but it takes less than a minute and it's something Google requires.
|
125 |
Follow <a href="https://console.developers.google.com/flows/enableapi?apiid=maps_embed_backend&keyType=CLIENT_SIDE&reusekey=true" target="_blank">wizard step #1</a> - login with any Gmail account, click next/confirm a few times with the default settings & copy the key you see on the screen; it's the key you need. Then use <a href="https://console.developers.google.com/flows/enableapi?apiid=static_maps_backend&keyType=CLIENT_SIDE&reusekey=true" target="_blank">wizard step #2</a>, select the same "My Project" project from the list and that's it. Save the key in GMW settings.
|
126 |
-
If you want to protect your API key by using the "Accept requests from these HTTP referrers (web sites)" option in Google Console make sure to add your domain in these two formats:
|
127 |
|
128 |
= Thumbnail map works but lightbox won't open on click =
|
129 |
|
@@ -144,6 +144,11 @@ Read the <a href="http://wordpress.org/support/plugin/google-maps-widget">suppor
|
|
144 |
|
145 |
== Changelog ==
|
146 |
|
|
|
|
|
|
|
|
|
|
|
147 |
= 3.25 =
|
148 |
* 2016/03/24
|
149 |
* even more new map pins
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?business=gordan@webfactoryltd.com&cmd=_xclick¤cy_code=USD&amount=&item_name=Google%20Maps%20Widget%20Donation
|
5 |
License: GPLv2 or later
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
+
Requires at least: 4.0
|
8 |
+
Tested up to: 4.5
|
9 |
+
Stable tag: 3.30
|
10 |
|
11 |
Displays a single image, super-fast loading Google map in a widget. A larger map with all interactive features is available on click in a lightbox.
|
12 |
|
52 |
* by using the _[gmw id="#"]_ shortcode you can display the map in any page, post, or custom post type (this is a PRO feature)
|
53 |
|
54 |
|
55 |
+
> **PRO** version offers more than 50 extra features including extra pins, skins, export & import features, Google Analytics integration and premium support. Install the plugin and try the PRO features 7 days for free!
|
56 |
|
57 |
|
58 |
**What others say about the plugin**
|
123 |
|
124 |
We understand that creating an API key is frustrating but it takes less than a minute and it's something Google requires.
|
125 |
Follow <a href="https://console.developers.google.com/flows/enableapi?apiid=maps_embed_backend&keyType=CLIENT_SIDE&reusekey=true" target="_blank">wizard step #1</a> - login with any Gmail account, click next/confirm a few times with the default settings & copy the key you see on the screen; it's the key you need. Then use <a href="https://console.developers.google.com/flows/enableapi?apiid=static_maps_backend&keyType=CLIENT_SIDE&reusekey=true" target="_blank">wizard step #2</a>, select the same "My Project" project from the list and that's it. Save the key in GMW settings.
|
126 |
+
If you want to protect your API key by using the "Accept requests from these HTTP referrers (web sites)" option in Google Console make sure to add your domain in these two formats: `*.mydomain.com/*` and `mydomain.com/*` and wait a few minutes until Google makes the necessary changes.
|
127 |
|
128 |
= Thumbnail map works but lightbox won't open on click =
|
129 |
|
144 |
|
145 |
== Changelog ==
|
146 |
|
147 |
+
= 3.30 =
|
148 |
+
* 2016/04/14
|
149 |
+
* bug fixes
|
150 |
+
* WP v4.5 updates
|
151 |
+
|
152 |
= 3.25 =
|
153 |
* 2016/03/24
|
154 |
* even more new map pins
|