Version Description
- 2019/07/31
- changed name from Google Maps Widget to Maps Widget for Google Maps
- removed old trial code
Download this release
Release Info
Developer | WebFactory |
Plugin | Google Maps Widget – Ultimate Google Maps Plugin |
Version | 4.16 |
Comparing to | |
See all releases |
Code changes from version 4.15 to 4.16
- css/gmw-admin.css +5 -62
- css/gmw.css +2 -2
- gmw-tracking.php +6 -4
- gmw-widget.php +9 -9
- google-maps-widget.php +41 -137
- images/gmw-logo.png +0 -0
- js/gmw-admin-plugins.js +2 -2
- js/gmw-admin-pointers.js +3 -3
- js/gmw-admin.js +3 -70
- js/gmw.js +1 -1
- readme.txt +27 -22
css/gmw-admin.css
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*
|
2 |
-
* Google Maps
|
3 |
-
* (c) Web factory Ltd, 2012 -
|
4 |
*/
|
5 |
|
6 |
@import url(//fonts.googleapis.com/css?family=RobotoDraft:regular,bold,italic,thin,light&lang=en);
|
@@ -146,6 +146,7 @@ body.widgets-php .select2-container--default .select2-results__option[aria-disab
|
|
146 |
#gmw_promo_dialog {
|
147 |
padding: 0;
|
148 |
display: none;
|
|
|
149 |
}
|
150 |
|
151 |
.gmw-dialog {
|
@@ -628,31 +629,6 @@ ul.ui-tabs-nav{
|
|
628 |
background: rgba(0,0,0,0.15);
|
629 |
}
|
630 |
|
631 |
-
.gmw_goto_trial.button-secondary {
|
632 |
-
border: 2px solid #666;
|
633 |
-
box-shadow: none !important;
|
634 |
-
border-radius: 4px;
|
635 |
-
background: #fff;
|
636 |
-
color: #666 !important;
|
637 |
-
font-weight: bold;
|
638 |
-
text-transform: uppercase;
|
639 |
-
font-size: 12px;
|
640 |
-
padding: 10px 20px;
|
641 |
-
text-shadow:none !important;
|
642 |
-
height: auto !important;
|
643 |
-
margin-left: 20px;
|
644 |
-
margin-top: 20px;
|
645 |
-
}
|
646 |
-
|
647 |
-
.gmw_goto_trial.button-secondary:hover {
|
648 |
-
background: rgba(0,0,0,0.15);
|
649 |
-
}
|
650 |
-
|
651 |
-
.footer .gmw_goto_trial {
|
652 |
-
background: #f5f5f5;
|
653 |
-
margin-top: 0;
|
654 |
-
}
|
655 |
-
|
656 |
.gmw-footer-intro {
|
657 |
display: block;
|
658 |
padding: 30px 40px;
|
@@ -713,36 +689,16 @@ ul.ui-tabs-nav{
|
|
713 |
color: #fff !important;
|
714 |
}
|
715 |
|
716 |
-
/* Trial */
|
717 |
-
#gmw_dialog_trial .content {
|
718 |
-
padding: 40px 130px 15px 130px;
|
719 |
-
background-color: #5fb5d8;
|
720 |
-
border: 1px solid #5fb5d8;
|
721 |
-
}
|
722 |
|
723 |
#gmw_dialog_subscribe .content a {
|
724 |
color: #0085ba;
|
725 |
}
|
726 |
|
727 |
-
#gmw_dialog_trial h3 {
|
728 |
-
text-align: center;
|
729 |
-
color: #fff;
|
730 |
-
}
|
731 |
-
|
732 |
-
#gmw_dialog_trial input[type="text"] {
|
733 |
-
border: 1px solid #dcdcdc;
|
734 |
-
box-shadow:none;
|
735 |
-
padding: 25px !important;
|
736 |
-
height: 60px !important;
|
737 |
-
display: block;
|
738 |
-
border-radius:3px;
|
739 |
-
}
|
740 |
-
|
741 |
#gmw_promo_dialog input[type="text"]:focus {
|
742 |
border: 1px solid #5b9dd9;
|
743 |
}
|
744 |
|
745 |
-
#
|
746 |
display: block;
|
747 |
border-radius:4px;
|
748 |
background: #0085ba;
|
@@ -756,19 +712,10 @@ ul.ui-tabs-nav{
|
|
756 |
box-shadow: none !important;
|
757 |
}
|
758 |
|
759 |
-
#
|
760 |
-
background: #00719e !important;
|
761 |
-
}
|
762 |
-
|
763 |
-
#gmw_dialog_subscribe .footer, #gmw_dialog_trial .footer {
|
764 |
background: #5fb5d8;
|
765 |
}
|
766 |
|
767 |
-
#gmw_dialog_trial .footer {
|
768 |
-
padding: 15px 135px 50px 135px;
|
769 |
-
}
|
770 |
-
|
771 |
-
|
772 |
#gmw_dialog_subscribe .footer p,
|
773 |
#gmw_dialog_subscribe .footer ul li {
|
774 |
color: #fff;
|
@@ -1095,10 +1042,6 @@ ul.ui-tabs-nav{
|
|
1095 |
text-transform: none;
|
1096 |
}
|
1097 |
|
1098 |
-
.gmw-promo-box-trial {
|
1099 |
-
background-color: #5fb5d8;
|
1100 |
-
}
|
1101 |
-
|
1102 |
#gmw_dialog_intro .header {
|
1103 |
padding: 30px 80px;
|
1104 |
color: #666;
|
1 |
/*
|
2 |
+
* Maps Widget for Google Maps
|
3 |
+
* (c) Web factory Ltd, 2012 - 2019
|
4 |
*/
|
5 |
|
6 |
@import url(//fonts.googleapis.com/css?family=RobotoDraft:regular,bold,italic,thin,light&lang=en);
|
146 |
#gmw_promo_dialog {
|
147 |
padding: 0;
|
148 |
display: none;
|
149 |
+
overflow: hidden;
|
150 |
}
|
151 |
|
152 |
.gmw-dialog {
|
629 |
background: rgba(0,0,0,0.15);
|
630 |
}
|
631 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
632 |
.gmw-footer-intro {
|
633 |
display: block;
|
634 |
padding: 30px 40px;
|
689 |
color: #fff !important;
|
690 |
}
|
691 |
|
|
|
|
|
|
|
|
|
|
|
|
|
692 |
|
693 |
#gmw_dialog_subscribe .content a {
|
694 |
color: #0085ba;
|
695 |
}
|
696 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
697 |
#gmw_promo_dialog input[type="text"]:focus {
|
698 |
border: 1px solid #5b9dd9;
|
699 |
}
|
700 |
|
701 |
+
#gmw_dialog_activate .button.button-primary {
|
702 |
display: block;
|
703 |
border-radius:4px;
|
704 |
background: #0085ba;
|
712 |
box-shadow: none !important;
|
713 |
}
|
714 |
|
715 |
+
#gmw_dialog_subscribe .footer {
|
|
|
|
|
|
|
|
|
716 |
background: #5fb5d8;
|
717 |
}
|
718 |
|
|
|
|
|
|
|
|
|
|
|
719 |
#gmw_dialog_subscribe .footer p,
|
720 |
#gmw_dialog_subscribe .footer ul li {
|
721 |
color: #fff;
|
1042 |
text-transform: none;
|
1043 |
}
|
1044 |
|
|
|
|
|
|
|
|
|
1045 |
#gmw_dialog_intro .header {
|
1046 |
padding: 30px 80px;
|
1047 |
color: #666;
|
css/gmw.css
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*
|
2 |
-
* Google Maps
|
3 |
-
* (c) Web factory Ltd, 2012 -
|
4 |
*/
|
5 |
|
6 |
.gmw-header, .gmw-footer {
|
1 |
/*
|
2 |
+
* Maps Widget for Google Maps
|
3 |
+
* (c) Web factory Ltd, 2012 - 2019
|
4 |
*/
|
5 |
|
6 |
.gmw-header, .gmw-footer {
|
gmw-tracking.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
* Google Maps
|
4 |
* Plugin usage tracking
|
5 |
* (c) Web factory Ltd, 2012 - 2018
|
6 |
*/
|
@@ -59,12 +59,14 @@ class GMW_tracking {
|
|
59 |
|
60 |
// save user's choice for (not) allowing tracking
|
61 |
static function check_opt_in_out() {
|
62 |
-
|
|
|
|
|
63 |
GMW::set_options(array('allow_tracking' => true));
|
64 |
self::send_data(true);
|
65 |
wp_safe_redirect(esc_url_raw(remove_query_arg('gmw_tracking')));
|
66 |
die();
|
67 |
-
} elseif (
|
68 |
GMW::set_options(array('allow_tracking' => false));
|
69 |
wp_safe_redirect(esc_url_raw(remove_query_arg('gmw_tracking')));
|
70 |
die();
|
@@ -78,7 +80,7 @@ class GMW_tracking {
|
|
78 |
$optout_url = add_query_arg('gmw_tracking', 'opt_out');
|
79 |
|
80 |
echo '<div class="updated"><p>';
|
81 |
-
echo __('Please help us improve <strong>Google Maps
|
82 |
echo '<br /><a href="' . esc_url($optin_url) . '" style="vertical-align: baseline; margin-top: 15px;" class="button-primary">' . __('Allow', 'google-maps-widget') . '</a>';
|
83 |
echo ' <a href="' . esc_url($optout_url) . '" class="">' . __('Do not allow tracking', 'google-maps-widget') . '</a>';
|
84 |
echo '</p></div>';
|
1 |
<?php
|
2 |
/*
|
3 |
+
* Maps Widget for Google Maps
|
4 |
* Plugin usage tracking
|
5 |
* (c) Web factory Ltd, 2012 - 2018
|
6 |
*/
|
59 |
|
60 |
// save user's choice for (not) allowing tracking
|
61 |
static function check_opt_in_out() {
|
62 |
+
$gmw_tracking = substr(sanitize_key(@$_GET['gmw_tracking']), 0, 32);
|
63 |
+
|
64 |
+
if ($gmw_tracking == 'opt_in') {
|
65 |
GMW::set_options(array('allow_tracking' => true));
|
66 |
self::send_data(true);
|
67 |
wp_safe_redirect(esc_url_raw(remove_query_arg('gmw_tracking')));
|
68 |
die();
|
69 |
+
} elseif ($gmw_tracking == 'opt_out') {
|
70 |
GMW::set_options(array('allow_tracking' => false));
|
71 |
wp_safe_redirect(esc_url_raw(remove_query_arg('gmw_tracking')));
|
72 |
die();
|
80 |
$optout_url = add_query_arg('gmw_tracking', 'opt_out');
|
81 |
|
82 |
echo '<div class="updated"><p>';
|
83 |
+
echo __('Please help us improve <strong>Maps Widget for Google Maps</strong> by allowing tracking of anonymous usage data. Absolutely <strong>no sensitive data is tracked</strong> (<a href="http://www.gmapswidget.com/plugin-tracking-info/" target="_blank">complete disclosure & details of our tracking policy</a>).', 'google-maps-widget');
|
84 |
echo '<br /><a href="' . esc_url($optin_url) . '" style="vertical-align: baseline; margin-top: 15px;" class="button-primary">' . __('Allow', 'google-maps-widget') . '</a>';
|
85 |
echo ' <a href="' . esc_url($optout_url) . '" class="">' . __('Do not allow tracking', 'google-maps-widget') . '</a>';
|
86 |
echo '</p></div>';
|
gmw-widget.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
* Google Maps
|
4 |
* Widget definition, admin GUI and widget rendering functions
|
5 |
* (c) Web factory Ltd, 2012 - 2018
|
6 |
*/
|
@@ -53,7 +53,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
53 |
|
54 |
// constructor - define the widget
|
55 |
function __construct() {
|
56 |
-
$title = __('Google Maps
|
57 |
|
58 |
$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);
|
59 |
$control_ops = array('width' => 450, 'height' => 350);
|
@@ -205,8 +205,8 @@ class GoogleMapsWidget extends WP_Widget {
|
|
205 |
if (GMW::is_activated()) {
|
206 |
$plugin = plugin_basename(GMW_PLUGIN_DIR . GMW_BASE_FILE);
|
207 |
$update_url = wp_nonce_url(admin_url('update.php?action=upgrade-plugin&plugin=' . urlencode($plugin)), 'upgrade-plugin_' . $plugin );
|
208 |
-
echo '<p>Google Maps
|
209 |
-
echo '<p><a href="' . esc_url($update_url) . '" class="button button-primary">Update Google Maps
|
210 |
echo '<style type="text/css"> #widget-' . $this->id . '-savewidget { display: none; } </style>';
|
211 |
echo '<input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="hidden" value="' . esc_attr($title) . '">';
|
212 |
|
@@ -221,7 +221,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
221 |
// api key warning
|
222 |
if (!GMW::get_api_key('test')) {
|
223 |
echo '<p class="gmw-api-key-error"><b>Important!</b> ';
|
224 |
-
echo 'Please go to <a href="' . admin_url('options-general.php?page=gmw_options') . '" title="Google Maps
|
225 |
}
|
226 |
|
227 |
// widget options markup
|
@@ -434,12 +434,12 @@ class GoogleMapsWidget extends WP_Widget {
|
|
434 |
echo ' <a class="open_promo_dialog" href="#">Activate PRO features NOW</a>';
|
435 |
echo '</p>';
|
436 |
echo '<h4>' . __('Rate the plugin & spread the word', 'google-maps-widget') . '</h4>';
|
437 |
-
echo '<p>It won\'t take you more than a minute, but it will help us immensely. So please - <a href="https://wordpress.org/support/view/plugin-reviews/google-maps-widget" target="_blank">rate the plugin</a>. Or spread the word by <a href="https://twitter.com/intent/tweet?via=WebFactoryLtd&text=' . urlencode('I\'m using the #free
|
438 |
echo '</div>';
|
439 |
// end - info tab
|
440 |
echo '</div><p></p>'; // tabs
|
441 |
|
442 |
-
echo '<p class="widget_footer_info">' . __('Upgrade to Google Maps
|
443 |
} // form
|
444 |
|
445 |
|
@@ -497,9 +497,9 @@ class GoogleMapsWidget extends WP_Widget {
|
|
497 |
// no user map key -> disable map
|
498 |
if ( !GMW::get_api_key('test') ) {
|
499 |
if ( is_user_logged_in() && current_user_can('administrator') ) {
|
500 |
-
echo $widget['before_widget'] . '<div style="border: 1px solid black; padding: 20px;">Open <a href="' . admin_url('options-general.php?page=gmw_options') . '">Google Maps
|
501 |
} else {
|
502 |
-
echo $widget['before_widget'] . '<div style="border: 1px solid black; padding: 20px;">Open Google Maps
|
503 |
}
|
504 |
|
505 |
return;
|
1 |
<?php
|
2 |
/*
|
3 |
+
* Maps Widget for Google Maps
|
4 |
* Widget definition, admin GUI and widget rendering functions
|
5 |
* (c) Web factory Ltd, 2012 - 2018
|
6 |
*/
|
53 |
|
54 |
// constructor - define the widget
|
55 |
function __construct() {
|
56 |
+
$title = __('Maps Widget for Google Maps', 'google-maps-widget');
|
57 |
|
58 |
$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);
|
59 |
$control_ops = array('width' => 450, 'height' => 350);
|
205 |
if (GMW::is_activated()) {
|
206 |
$plugin = plugin_basename(GMW_PLUGIN_DIR . GMW_BASE_FILE);
|
207 |
$update_url = wp_nonce_url(admin_url('update.php?action=upgrade-plugin&plugin=' . urlencode($plugin)), 'upgrade-plugin_' . $plugin );
|
208 |
+
echo '<p>Maps Widget for Google Maps <b class="gmw-pro-red">PRO</b> has been activated! Please <b>click the button below</b> to update plugin files to PRO version. Widget data is not lost and it will not get lost by updating.</p>';
|
209 |
+
echo '<p><a href="' . esc_url($update_url) . '" class="button button-primary">Update Maps Widget for Google Maps</a></p>';
|
210 |
echo '<style type="text/css"> #widget-' . $this->id . '-savewidget { display: none; } </style>';
|
211 |
echo '<input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="hidden" value="' . esc_attr($title) . '">';
|
212 |
|
221 |
// api key warning
|
222 |
if (!GMW::get_api_key('test')) {
|
223 |
echo '<p class="gmw-api-key-error"><b>Important!</b> ';
|
224 |
+
echo 'Please go to <a href="' . admin_url('options-general.php?page=gmw_options') . '" title="Maps Widget for Google Maps settings">settings</a> & follow simple instructions to get a <b>free Google Maps API key</b>. It only takes a minute. Without a key your <b>maps will NOT work</b>. This rule is enforced by Google. Sorry for the inconvenience.</p>';
|
225 |
}
|
226 |
|
227 |
// widget options markup
|
434 |
echo ' <a class="open_promo_dialog" href="#">Activate PRO features NOW</a>';
|
435 |
echo '</p>';
|
436 |
echo '<h4>' . __('Rate the plugin & spread the word', 'google-maps-widget') . '</h4>';
|
437 |
+
echo '<p>It won\'t take you more than a minute, but it will help us immensely. So please - <a href="https://wordpress.org/support/view/plugin-reviews/google-maps-widget" target="_blank">rate the plugin</a>. Or spread the word by <a href="https://twitter.com/intent/tweet?via=WebFactoryLtd&text=' . urlencode('I\'m using the #free Maps Widget for Google Maps for #wordpress. You can grab it too at http://goo.gl/2qcbbf') . '" target="_blank">tweeting about it</a>. Thank you!</p>';
|
438 |
echo '</div>';
|
439 |
// end - info tab
|
440 |
echo '</div><p></p>'; // tabs
|
441 |
|
442 |
+
echo '<p class="widget_footer_info">' . __('Upgrade to Maps Widget for Google Maps <span class="gmw-pro-red">PRO</span> to get more than 50 extra options & features available immeditely. <a class="open_promo_dialog" href="#">Upgrade now</a>.', 'google-maps-widget') . '</p>';
|
443 |
} // form
|
444 |
|
445 |
|
497 |
// no user map key -> disable map
|
498 |
if ( !GMW::get_api_key('test') ) {
|
499 |
if ( is_user_logged_in() && current_user_can('administrator') ) {
|
500 |
+
echo $widget['before_widget'] . '<div style="border: 1px solid black; padding: 20px;">Open <a href="' . admin_url('options-general.php?page=gmw_options') . '">Maps Widget for Google Maps settings</a> to configure the Google Maps API key. The map can\'t work without it. This is a Google\'s rule that all sites must follow.</div>' . $widget['after_widget'];
|
501 |
} else {
|
502 |
+
echo $widget['before_widget'] . '<div style="border: 1px solid black; padding: 20px;">Open Maps Widget for Google Maps settings to configure the Google Maps API key. The map can\'t work without it. This is a Google\'s rule that all sites must follow.</div>' . $widget['after_widget'];
|
503 |
}
|
504 |
|
505 |
return;
|
google-maps-widget.php
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Plugin Name: Google Maps
|
4 |
Plugin URI: https://www.gmapswidget.com/
|
5 |
-
Description: Display a single image super-fast loading Google
|
6 |
-
Author:
|
7 |
-
Version: 4.
|
8 |
Author URI: https://www.gmapswidget.com/
|
9 |
Text Domain: google-maps-widget
|
10 |
Domain Path: lang
|
11 |
|
12 |
-
Copyright 2012 -
|
13 |
|
14 |
This program is free software; you can redistribute it and/or modify
|
15 |
it under the terms of the GNU General Public License, version 2, as
|
@@ -83,7 +83,6 @@ class GMW {
|
|
83 |
|
84 |
// register AJAX endpoints
|
85 |
add_action('wp_ajax_gmw_test_api_key', array('GMW', 'test_api_key_ajax'));
|
86 |
-
add_action('wp_ajax_gmw_get_trial', array('GMW', 'get_trial_ajax'));
|
87 |
add_action('wp_ajax_gmw_activate', array('GMW', 'activate_license_key_ajax'));
|
88 |
add_action('wp_ajax_gmw_dismiss_pointer', array('GMW', 'dismiss_pointer_ajax'));
|
89 |
|
@@ -203,8 +202,8 @@ class GMW {
|
|
203 |
|
204 |
// add widgets link to plugins page
|
205 |
static function plugin_action_links($links) {
|
206 |
-
$settings_link = '<a href="' . admin_url('options-general.php?page=gmw_options') . '" title="' . __('Settings for Google Maps
|
207 |
-
$widgets_link = '<a href="' . admin_url('widgets.php') . '" title="' . __('Configure
|
208 |
|
209 |
array_unshift($links, $settings_link);
|
210 |
array_unshift($links, $widgets_link);
|
@@ -215,7 +214,7 @@ class GMW {
|
|
215 |
|
216 |
// add links to plugin's description in plugins table
|
217 |
static function plugin_meta_links($links, $file) {
|
218 |
-
$documentation_link = '<a target="_blank" href="http://www.gmapswidget.com/documentation/" title="' . __('View Google Maps
|
219 |
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="' . __('Problems? We are here to help!', 'google-maps-widget') . '">' . __('Support', 'google-maps-widget') . '</a>';
|
220 |
$review_link = '<a target="_blank" href="https://wordpress.org/support/view/plugin-reviews/google-maps-widget?filter=5#pages" title="' . __('If you like it, please review the plugin', 'google-maps-widget') . '">' . __('Review the plugin', 'google-maps-widget') . '</a>';
|
221 |
$activate_link = '<a href="' . esc_url(admin_url('options-general.php?page=gmw_options&gmw_open_promo_dialog')) . '">' . __('Activate PRO features', 'google-maps-widget') . '</a>';
|
@@ -246,7 +245,7 @@ class GMW {
|
|
246 |
|
247 |
// display error message if WP version is too low
|
248 |
static function notice_min_version_error() {
|
249 |
-
echo '<div class="error"><p>' . sprintf(__('Google Maps
|
250 |
} // notice_min_version_error
|
251 |
|
252 |
|
@@ -293,7 +292,7 @@ class GMW {
|
|
293 |
|
294 |
$msg = '';
|
295 |
$error = false;
|
296 |
-
$api_key =
|
297 |
|
298 |
$test = wp_remote_get(esc_url_raw('https://maps.googleapis.com/maps/api/staticmap?center=new+york+usa&size=100x100&key=' . $api_key));
|
299 |
if (wp_remote_retrieve_response_message($test) == 'OK') {
|
@@ -327,7 +326,7 @@ class GMW {
|
|
327 |
|
328 |
if ($widget['lightbox_mode'] == 'place') {
|
329 |
$map_params['q'] = $widget['address'];
|
330 |
-
$map_params['attribution_source'] = get_bloginfo('name')? get_bloginfo('name'): 'Google Maps
|
331 |
$map_params['attribution_web_url'] = get_home_url();
|
332 |
$map_params['attribution_ios_deep_link_id'] = 'comgooglemaps://?daddr=' . $widget['address'];
|
333 |
$map_params['maptype'] = $widget['lightbox_map_type'];
|
@@ -467,7 +466,7 @@ class GMW {
|
|
467 |
|
468 |
// add plugin menus
|
469 |
static function add_menus() {
|
470 |
-
$title = __('Google Maps
|
471 |
add_options_page($title, $title, 'manage_options', GMW::$options, array('GMW', 'settings_screen'));
|
472 |
} // add_menus
|
473 |
|
@@ -479,13 +478,15 @@ class GMW {
|
|
479 |
exit;
|
480 |
}
|
481 |
|
482 |
-
|
|
|
|
|
483 |
GMW::set_options(array('dismiss_notice_upgrade2' => true));
|
484 |
-
} elseif ($
|
485 |
GMW::set_options(array('dismiss_notice_rate' => true));
|
486 |
-
} elseif ($
|
487 |
GMW::set_options(array('dismiss_notice_api_key' => true));
|
488 |
-
} elseif ($
|
489 |
GMW::set_options(array('dismiss_notice_olduser' => true));
|
490 |
} else {
|
491 |
wp_safe_redirect(admin_url());
|
@@ -493,7 +494,7 @@ class GMW {
|
|
493 |
}
|
494 |
|
495 |
if (!empty($_GET['redirect'])) {
|
496 |
-
wp_safe_redirect($_GET['redirect']);
|
497 |
} else {
|
498 |
wp_safe_redirect(admin_url());
|
499 |
}
|
@@ -554,7 +555,7 @@ class GMW {
|
|
554 |
$activate_url = admin_url('options-general.php?page=gmw_options&gmw_open_promo_dialog');
|
555 |
$dismiss_url = add_query_arg(array('action' => 'gmw_dismiss_notice', 'notice' => 'upgrade', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
556 |
|
557 |
-
echo '<div id="gmw_activate_notice" class="updated notice"><p>' . __('<b>Google Maps
|
558 |
|
559 |
if (current_time('timestamp') - $options['first_install'] < $promo_delta) {
|
560 |
$delta = $options['first_install_gmt'] + $promo_delta - time();
|
@@ -583,7 +584,7 @@ class GMW {
|
|
583 |
$dismiss_url = add_query_arg(array('action' => 'gmw_dismiss_notice', 'notice' => 'olduser', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
584 |
|
585 |
echo '<div class="updated notice">';
|
586 |
-
echo '<p style="font-size: 14px;">We have a <a class="open_promo_dialog" href="' . $activate_url . '">special offer</a> only for users like <b>you</b> who\'ve been using
|
587 |
|
588 |
echo '<a class="open_promo_dialog button button-primary" href="' . $activate_url . '"><b>Grab the limited offer!</b></a> <a href="' . esc_url($dismiss_url) . '" style="margin: 3px 0 0 5px; display: inline-block;">' . __('I\'m not interested (remove notice)', 'google-maps-widget') . '</a>';
|
589 |
echo '</p></div>';
|
@@ -595,7 +596,7 @@ class GMW {
|
|
595 |
$rate_url = 'https://wordpress.org/support/view/plugin-reviews/google-maps-widget?rate=5#postform';
|
596 |
$dismiss_url = add_query_arg(array('action' => 'gmw_dismiss_notice', 'notice' => 'rate', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
597 |
|
598 |
-
echo '<div id="gmw_rate_notice" class="updated notice"><p>' . __('Hi! We saw you\'ve been using <b>Google Maps
|
599 |
|
600 |
echo '<br><a target="_blank" href="' . esc_url($rate_url) . '" style="vertical-align: baseline; margin-top: 15px;" class="button-primary">' . __('Help make the plugin better by rating it', 'google-maps-widget') . '</a>';
|
601 |
echo ' <a href="' . esc_url($dismiss_url) . '">' . __('I already rated the plugin', 'google-maps-widget') . '</a>';
|
@@ -626,9 +627,9 @@ class GMW {
|
|
626 |
$js_localize = array('dialog_map_title' => __('Pick an address by drag & dropping the pin', 'google-maps-widget'),
|
627 |
'undocumented_error' => __('An undocumented error has occured. Please refresh the page and try again.', 'google-maps-widget'),
|
628 |
'bad_api_key' => __('The API key format does not look right. Please double-check it.', 'google-maps-widget'),
|
629 |
-
'dialog_promo_title' => '<img alt="' . __('Google Maps
|
630 |
'dialog_pins_title' => __('Pins Library', 'google-maps-widget'),
|
631 |
-
'plugin_name' => __('Google Maps
|
632 |
'id_base' => 'googlemapswidget',
|
633 |
'map_picker_not_active' => __('Drag&drop address picking interface is a PRO feature. Interested in switching to PRO?', 'google-maps-widget'),
|
634 |
'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'),
|
@@ -638,8 +639,7 @@ class GMW {
|
|
638 |
'settings_url' => admin_url('options-general.php?page=gmw_options'),
|
639 |
'nonce_test_api_key' => wp_create_nonce('gmw_test_api_key'),
|
640 |
'nonce_activate_license_key' => wp_create_nonce('gmw_activate_license_key'),
|
641 |
-
'
|
642 |
-
'deactivate_confirmation' => __('Are you sure you want to deactivate 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'));
|
643 |
|
644 |
if (GMW::is_plugin_admin_page('widgets') || GMW::is_plugin_admin_page('settings') || is_customize_preview()) {
|
645 |
wp_enqueue_script('jquery-ui-tabs');
|
@@ -695,7 +695,7 @@ class GMW {
|
|
695 |
// reset all pointers to default state - visible
|
696 |
static function reset_pointers() {
|
697 |
$pointers = array();
|
698 |
-
$pointers['welcome'] = array('target' => '#menu-appearance', 'edge' => 'left', 'align' => 'right', 'content' => 'Thank you for installing <b>Google Maps
|
699 |
|
700 |
set_transient('gmw_pointers', $pointers, 60 * DAY_IN_SECONDS);
|
701 |
} // reset_pointers
|
@@ -706,7 +706,8 @@ class GMW {
|
|
706 |
check_ajax_referer('gmw_dismiss_pointer');
|
707 |
|
708 |
$pointers = get_transient('gmw_pointers');
|
709 |
-
|
|
|
710 |
|
711 |
if (empty($pointers) || empty($pointers[$pointer])) {
|
712 |
wp_send_json_error();
|
@@ -896,8 +897,8 @@ class GMW {
|
|
896 |
$plugin = plugin_basename(__FILE__);
|
897 |
$update_url = wp_nonce_url(admin_url('update.php?action=upgrade-plugin&plugin=' . urlencode($plugin)), 'upgrade-plugin_' . $plugin );
|
898 |
$out .= '<div class="after_activate" ' . $visible . '>';
|
899 |
-
$out .= '<p class="center">Thank you for purchasing Google Maps
|
900 |
-
$out .= '<p class="center"><a href="' . esc_url($update_url) . '" class="button button-primary">Update Google Maps
|
901 |
$out .= '</div>';
|
902 |
|
903 |
$out .= '</div>'; // content
|
@@ -958,51 +959,6 @@ class GMW {
|
|
958 |
$out .= '</div>';
|
959 |
$out .= '</div>'; // pro features screen
|
960 |
|
961 |
-
$out .= '<div id="gmw_dialog_trial" style="display: none;" class="gmw_promo_dialog_screen">
|
962 |
-
<div class="content">';
|
963 |
-
if (GMW::is_activated()) {
|
964 |
-
$visible = ' style="display: none;"';
|
965 |
-
} else {
|
966 |
-
$visible = '';
|
967 |
-
}
|
968 |
-
$out .= '<div class="before_trial" ' . $visible . '>
|
969 |
-
<h3>Fill out the form and get your free trial started <b>IMMEDIATELY</b>!</h3>';
|
970 |
-
$out .= '<p class="input_row">
|
971 |
-
<input value="' . $name . '" type="text" id="gmw_name" name="gmw_name" placeholder="Your name">
|
972 |
-
<span class="error name" style="display: none;">Please enter your name.</span>
|
973 |
-
</p>';
|
974 |
-
$out .= '<p class="input_row">
|
975 |
-
<input value="' . $current_user->user_email . '" type="text" name="gmw_email" id="gmw_email" placeholder="Your email address" required="required">
|
976 |
-
<span style="display: none;" class="error email">Please double check your email address.</span>
|
977 |
-
</p>';
|
978 |
-
$out .= '<p class="center">
|
979 |
-
<a id="gmw_start_trial" href="#" class="button button-primary">Start my 7 days free trial</a>
|
980 |
-
<p class="center">Or <a href="#" class="gmw_goto_intro">go PRO now</a></p>
|
981 |
-
</p>';
|
982 |
-
$out .= '</div>'; // before_trial
|
983 |
-
|
984 |
-
if (!GMW::is_activated()) {
|
985 |
-
$visible = ' style="display: none;"';
|
986 |
-
} else {
|
987 |
-
$visible = '';
|
988 |
-
}
|
989 |
-
$plugin = plugin_basename(__FILE__);
|
990 |
-
$update_url = wp_nonce_url(admin_url('update.php?action=upgrade-plugin&plugin=' . urlencode($plugin)), 'upgrade-plugin_' . $plugin );
|
991 |
-
$out .= '<div class="after_trial" ' . $visible . '>';
|
992 |
-
$out .= '<p class="center">Your Google Maps Widget <b class="gmw-pro-red">PRO</b> trial has been activated!</p><p class="center">Please <b>click the button below</b> to update plugin files to PRO version.</p>';
|
993 |
-
$out .= '<p class="center"><a href="' . esc_url($update_url) . '" class="button button-primary">Update Google Maps Widget to PRO</a></p>';
|
994 |
-
$out .= '</div>';
|
995 |
-
|
996 |
-
$out .= '</div>'; // content
|
997 |
-
|
998 |
-
$out .= '<div class="footer">
|
999 |
-
<ul class="gmw-faq-ul">
|
1000 |
-
<li>We\'ll never share your email address</li>
|
1001 |
-
<li>We hate spam too, so we never send it</li>
|
1002 |
-
</ul>
|
1003 |
-
</div>';
|
1004 |
-
$out .= '</div>'; // trial screen
|
1005 |
-
|
1006 |
$out .= '</div>'; // dialog
|
1007 |
} // promo dialog
|
1008 |
|
@@ -1024,13 +980,13 @@ class GMW {
|
|
1024 |
// complete options screen markup
|
1025 |
static function settings_screen() {
|
1026 |
if (!current_user_can('manage_options')) {
|
1027 |
-
wp_die('Cheating? You don\'t have the right to access this page.', 'Google Maps
|
1028 |
}
|
1029 |
|
1030 |
$options = GMW::get_options();
|
1031 |
|
1032 |
echo '<div class="wrap gmw-options">';
|
1033 |
-
echo '<h1><img alt="' . __('Google Maps
|
1034 |
|
1035 |
echo '<form method="post" action="options.php">';
|
1036 |
settings_fields(GMW::$options);
|
@@ -1049,7 +1005,7 @@ class GMW {
|
|
1049 |
|
1050 |
echo '<table class="form-table disabled">';
|
1051 |
echo '<tr>
|
1052 |
-
<th scope="row"><label for="widget_id">' . __('Google Maps
|
1053 |
<td><select disabled="disabled" name="' . GMW::$options . '[widget_id]" id="widget_id">';
|
1054 |
echo '<option value="">- select the widget to import pins to -</option>';
|
1055 |
echo '</select><br><span class="description">Choose a widget you want to import pins to. Any existing pins will be overwritten with the new pins. Other widget options will not be altered in any way.</span></td></tr>';
|
@@ -1092,7 +1048,7 @@ class GMW {
|
|
1092 |
echo '<table class="form-table disabled">';
|
1093 |
echo '<tr>
|
1094 |
<th scope="row"><label for="sc_map">' . __('Map Shortcode', 'google-maps-widget') . '</label></th>
|
1095 |
-
<td><input class="regular-text" name="' . GMW::$options . '[sc_map]" type="text" id="sc_map" value="' . esc_attr($options['sc_map']) . '" disabled="disabled" placeholder="Map shortcode" required="required" oninvalid="this.setCustomValidity(\'Please enter the shortcode you want to use for Google Maps
|
1096 |
<p class="description">If the default shortcode "gmw" is taken by another plugin change it to something else, eg: "gmaps".</p></td>
|
1097 |
</tr>';
|
1098 |
echo '<tr>
|
@@ -1135,13 +1091,13 @@ class GMW {
|
|
1135 |
echo '<tr>
|
1136 |
<th scope="row"><span>' . __('Export widgets', 'google-maps-widget') . '</span></th>
|
1137 |
<td><a href="#" class="button button-secondary button-disabled">Download export file</a>
|
1138 |
-
<p class="description">The export file will only
|
1139 |
</tr>';
|
1140 |
echo '<tr>
|
1141 |
<th scope="row"><span>' . __('Import widgets', 'google-maps-widget') . '</span></th>
|
1142 |
<td><input type="file" disabled="disabled" name="gmw_widgets_import" id="gmw_widgets_import" accept=".txt">
|
1143 |
<input type="button" disabled="disabled" name="submit-import" id="submit-import" class="button button-secondary button-large" value="Import widgets">';
|
1144 |
-
echo '<p class="description">Only use TXT export files generated by Google Maps
|
1145 |
Existing GMW widgets will not be overwritten nor any other widgets touched. If you renamed a sidebar or old one no longer exists widgets will be placed in the inactive widgets area.</p></td>
|
1146 |
</tr>';
|
1147 |
echo '</table>';
|
@@ -1152,8 +1108,8 @@ class GMW {
|
|
1152 |
$plugin = plugin_basename(__FILE__);
|
1153 |
$update_url = wp_nonce_url(admin_url('update.php?action=upgrade-plugin&plugin=' . urlencode($plugin)), 'upgrade-plugin_' . $plugin );
|
1154 |
|
1155 |
-
echo '<p>Your <b class="gmw-pro-red">PRO</b> license is validated & active. Please update the plugin to activate PRO features. In case of any problems, contact <a href="mailto:gmw@webfactoryltd.com?subject=Update%20problem" title="Contact Google Maps
|
1156 |
-
echo '<p><a href="' . esc_url($update_url) . '" class="button button-primary">Update Google Maps
|
1157 |
} else {
|
1158 |
echo '<p>If you already bought the <b class="gmw-pro-red">PRO</b> license please <a href="#" data-target-screen="gmw_dialog_activate" class="open_promo_dialog">enter your license key</a> to activate it.</p>';
|
1159 |
echo '<p>Interested in a lifetime <b class="gmw-pro-red">PRO</b> license that offers more than 50 extra fetures? <a href="#" class="open_promo_dialog button button-primary">Upgrade now!</a></p>';
|
@@ -1162,9 +1118,6 @@ class GMW {
|
|
1162 |
echo '</div>'; // license tab
|
1163 |
|
1164 |
echo '</form>';
|
1165 |
-
if (!GMW::is_activated()) {
|
1166 |
-
echo '<script type="text/javascript" src="https://gumroad.com/js/gumroad.js"></script>';
|
1167 |
-
}
|
1168 |
echo '</div>'; // wrap
|
1169 |
} // settings_screen
|
1170 |
|
@@ -1173,7 +1126,8 @@ class GMW {
|
|
1173 |
static function activate_license_key_ajax() {
|
1174 |
check_ajax_referer('gmw_activate_license_key');
|
1175 |
|
1176 |
-
$code =
|
|
|
1177 |
|
1178 |
if (strlen($code) < 6 || strlen($code) > 50) {
|
1179 |
wp_send_json_error(__('Please double-check the license key. The format is not valid.', 'google-maps-widget'));
|
@@ -1289,55 +1243,6 @@ class GMW {
|
|
1289 |
} // update_details
|
1290 |
|
1291 |
|
1292 |
-
// send user's name & email to activate trial
|
1293 |
-
static function get_trial_ajax() {
|
1294 |
-
check_ajax_referer('gmw_get_trial');
|
1295 |
-
|
1296 |
-
$name = trim($_POST['name']);
|
1297 |
-
$email = trim($_POST['email']);
|
1298 |
-
if (defined('WPLANG')) {
|
1299 |
-
$lang = strtolower(substr(WPLANG, 0, 2));
|
1300 |
-
} else {
|
1301 |
-
$lang = 'en';
|
1302 |
-
}
|
1303 |
-
|
1304 |
-
$request_params = array('sslverify' => false, 'timeout' => 15, 'redirection' => 2);
|
1305 |
-
$request_args = array('action' => 'get_trial',
|
1306 |
-
'name' => $name,
|
1307 |
-
'email' => $email,
|
1308 |
-
'version' => GMW::$version,
|
1309 |
-
'lang' => $lang,
|
1310 |
-
'codebase' => 'free',
|
1311 |
-
'ip' => $_SERVER['REMOTE_ADDR'],
|
1312 |
-
'site' => get_home_url());
|
1313 |
-
|
1314 |
-
$url = add_query_arg($request_args, GMW::$licensing_servers[0]);
|
1315 |
-
$response = wp_remote_get(esc_url_raw($url), $request_params);
|
1316 |
-
|
1317 |
-
if (is_wp_error($response) || !wp_remote_retrieve_body($response)) {
|
1318 |
-
$url = add_query_arg($request_args, GMW::$licensing_servers[1]);
|
1319 |
-
$response = wp_remote_get(esc_url_raw($url), $request_params);
|
1320 |
-
}
|
1321 |
-
|
1322 |
-
if (!is_wp_error($response) && wp_remote_retrieve_body($response)) {
|
1323 |
-
$result = wp_remote_retrieve_body($response);
|
1324 |
-
$result = json_decode($result, true);
|
1325 |
-
if (!empty($result['success']) && $result['success'] === true && is_array($result['data']) && sizeof($result['data']) == 3) {
|
1326 |
-
$result['data']['license_active'] = true;
|
1327 |
-
GMW::set_options($result['data']);
|
1328 |
-
set_site_transient('update_plugins', null);
|
1329 |
-
wp_send_json_success();
|
1330 |
-
} elseif (isset($result['success']) && $result['success'] === false && !empty($result['data'])) {
|
1331 |
-
wp_send_json_error($result['data']);
|
1332 |
-
} else {
|
1333 |
-
wp_send_json_error('Invalid response from licensing server. Please try again later.');
|
1334 |
-
}
|
1335 |
-
} else {
|
1336 |
-
wp_send_json_error('Unable to contact licensing server. Please try again in a few moments.');
|
1337 |
-
}
|
1338 |
-
} // get_trial_ajax
|
1339 |
-
|
1340 |
-
|
1341 |
// helper function for creating dropdowns
|
1342 |
static function create_select_options($options, $selected = null, $output = true) {
|
1343 |
$out = "\n";
|
@@ -1465,8 +1370,7 @@ class GMW {
|
|
1465 |
} // foreach
|
1466 |
}
|
1467 |
|
1468 |
-
$plugin_info = get_transient('wf-plugin-info-' . $plugin_slug)
|
1469 |
-
if (!empty($plugin_info) && is_object($plugin_info)) {
|
1470 |
array_unshift($res->plugins, $plugin_info);
|
1471 |
} else {
|
1472 |
$plugin_info = plugins_api('plugin_information', array(
|
1 |
<?php
|
2 |
/*
|
3 |
+
Plugin Name: Maps Widget for Google Maps
|
4 |
Plugin URI: https://www.gmapswidget.com/
|
5 |
+
Description: Display a single image super-fast loading Google Map in a widget. A larger, full featured map is available in a lightbox. Includes a user-friendly interface and numerous appearance options.
|
6 |
+
Author: WebFactory Ltd
|
7 |
+
Version: 4.16
|
8 |
Author URI: https://www.gmapswidget.com/
|
9 |
Text Domain: google-maps-widget
|
10 |
Domain Path: lang
|
11 |
|
12 |
+
Copyright 2012 - 2019 Web factory Ltd (email : gmw@webfactoryltd.com)
|
13 |
|
14 |
This program is free software; you can redistribute it and/or modify
|
15 |
it under the terms of the GNU General Public License, version 2, as
|
83 |
|
84 |
// register AJAX endpoints
|
85 |
add_action('wp_ajax_gmw_test_api_key', array('GMW', 'test_api_key_ajax'));
|
|
|
86 |
add_action('wp_ajax_gmw_activate', array('GMW', 'activate_license_key_ajax'));
|
87 |
add_action('wp_ajax_gmw_dismiss_pointer', array('GMW', 'dismiss_pointer_ajax'));
|
88 |
|
202 |
|
203 |
// add widgets link to plugins page
|
204 |
static function plugin_action_links($links) {
|
205 |
+
$settings_link = '<a href="' . admin_url('options-general.php?page=gmw_options') . '" title="' . __('Settings for Maps Widget for Google Maps', 'google-maps-widget') . '">' . __('Settings', 'google-maps-widget') . '</a>';
|
206 |
+
$widgets_link = '<a href="' . admin_url('widgets.php') . '" title="' . __('Configure Maps Widget for Google Maps for your theme', 'google-maps-widget') . '">' . __('Widgets', 'google-maps-widget') . '</a>';
|
207 |
|
208 |
array_unshift($links, $settings_link);
|
209 |
array_unshift($links, $widgets_link);
|
214 |
|
215 |
// add links to plugin's description in plugins table
|
216 |
static function plugin_meta_links($links, $file) {
|
217 |
+
$documentation_link = '<a target="_blank" href="http://www.gmapswidget.com/documentation/" title="' . __('View Maps Widget for Google Maps documentation', 'google-maps-widget') . '">'. __('Documentation', 'google-maps-widget') . '</a>';
|
218 |
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="' . __('Problems? We are here to help!', 'google-maps-widget') . '">' . __('Support', 'google-maps-widget') . '</a>';
|
219 |
$review_link = '<a target="_blank" href="https://wordpress.org/support/view/plugin-reviews/google-maps-widget?filter=5#pages" title="' . __('If you like it, please review the plugin', 'google-maps-widget') . '">' . __('Review the plugin', 'google-maps-widget') . '</a>';
|
220 |
$activate_link = '<a href="' . esc_url(admin_url('options-general.php?page=gmw_options&gmw_open_promo_dialog')) . '">' . __('Activate PRO features', 'google-maps-widget') . '</a>';
|
245 |
|
246 |
// display error message if WP version is too low
|
247 |
static function notice_min_version_error() {
|
248 |
+
echo '<div class="error"><p>' . sprintf(__('Maps Widget for Google Maps <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>';
|
249 |
} // notice_min_version_error
|
250 |
|
251 |
|
292 |
|
293 |
$msg = '';
|
294 |
$error = false;
|
295 |
+
$api_key = substr(sanitize_key(@$_GET['api_key']), 0, 128);
|
296 |
|
297 |
$test = wp_remote_get(esc_url_raw('https://maps.googleapis.com/maps/api/staticmap?center=new+york+usa&size=100x100&key=' . $api_key));
|
298 |
if (wp_remote_retrieve_response_message($test) == 'OK') {
|
326 |
|
327 |
if ($widget['lightbox_mode'] == 'place') {
|
328 |
$map_params['q'] = $widget['address'];
|
329 |
+
$map_params['attribution_source'] = get_bloginfo('name')? get_bloginfo('name'): 'Maps Widget for Google Maps';
|
330 |
$map_params['attribution_web_url'] = get_home_url();
|
331 |
$map_params['attribution_ios_deep_link_id'] = 'comgooglemaps://?daddr=' . $widget['address'];
|
332 |
$map_params['maptype'] = $widget['lightbox_map_type'];
|
466 |
|
467 |
// add plugin menus
|
468 |
static function add_menus() {
|
469 |
+
$title = __('Maps Widget for Google Maps', 'google-maps-widget');
|
470 |
add_options_page($title, $title, 'manage_options', GMW::$options, array('GMW', 'settings_screen'));
|
471 |
} // add_menus
|
472 |
|
478 |
exit;
|
479 |
}
|
480 |
|
481 |
+
$notice_name = substr(sanitize_key($_GET['notice']), 0, 32);
|
482 |
+
|
483 |
+
if ($notice_name == 'upgrade') {
|
484 |
GMW::set_options(array('dismiss_notice_upgrade2' => true));
|
485 |
+
} elseif ($notice_name == 'rate') {
|
486 |
GMW::set_options(array('dismiss_notice_rate' => true));
|
487 |
+
} elseif ($notice_name == 'api_key') {
|
488 |
GMW::set_options(array('dismiss_notice_api_key' => true));
|
489 |
+
} elseif ($notice_name == 'olduser') {
|
490 |
GMW::set_options(array('dismiss_notice_olduser' => true));
|
491 |
} else {
|
492 |
wp_safe_redirect(admin_url());
|
494 |
}
|
495 |
|
496 |
if (!empty($_GET['redirect'])) {
|
497 |
+
wp_safe_redirect(esc_url($_GET['redirect']));
|
498 |
} else {
|
499 |
wp_safe_redirect(admin_url());
|
500 |
}
|
555 |
$activate_url = admin_url('options-general.php?page=gmw_options&gmw_open_promo_dialog');
|
556 |
$dismiss_url = add_query_arg(array('action' => 'gmw_dismiss_notice', 'notice' => 'upgrade', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
557 |
|
558 |
+
echo '<div id="gmw_activate_notice" class="updated notice"><p>' . __('<b>Maps Widget for Google Maps <span style="color: #d54e21;">PRO</span></b> has more than 50 extra features & options. Our support is super fast & friendly and with the unlimited license you can install GMW on as many sites as you need.</p>', 'google-maps-widget');
|
559 |
|
560 |
if (current_time('timestamp') - $options['first_install'] < $promo_delta) {
|
561 |
$delta = $options['first_install_gmt'] + $promo_delta - time();
|
584 |
$dismiss_url = add_query_arg(array('action' => 'gmw_dismiss_notice', 'notice' => 'olduser', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
585 |
|
586 |
echo '<div class="updated notice">';
|
587 |
+
echo '<p style="font-size: 14px;">We have a <a class="open_promo_dialog" href="' . $activate_url . '">special offer</a> only for users like <b>you</b> who\'ve been using Maps Widget for Google Maps for a while: a <b>one time payment</b>, lifetime license for <b>only $29</b>! No nonsense!<br><a class="open_promo_dialog" href="' . $activate_url . '">Upgrade now</a> to <span class="gmw-pro-red">PRO</span> & get more than 50 extra options & features. License is valid for 3 sites.</p><br>';
|
588 |
|
589 |
echo '<a class="open_promo_dialog button button-primary" href="' . $activate_url . '"><b>Grab the limited offer!</b></a> <a href="' . esc_url($dismiss_url) . '" style="margin: 3px 0 0 5px; display: inline-block;">' . __('I\'m not interested (remove notice)', 'google-maps-widget') . '</a>';
|
590 |
echo '</p></div>';
|
596 |
$rate_url = 'https://wordpress.org/support/view/plugin-reviews/google-maps-widget?rate=5#postform';
|
597 |
$dismiss_url = add_query_arg(array('action' => 'gmw_dismiss_notice', 'notice' => 'rate', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
598 |
|
599 |
+
echo '<div id="gmw_rate_notice" class="updated notice"><p>' . __('Hi! We saw you\'ve been using <b>Maps Widget for Google Maps</b> for a week and wanted to ask for your help to make the plugin better.<br>We just need a minute of your time to rate the plugin. Thank you!', 'google-maps-widget');
|
600 |
|
601 |
echo '<br><a target="_blank" href="' . esc_url($rate_url) . '" style="vertical-align: baseline; margin-top: 15px;" class="button-primary">' . __('Help make the plugin better by rating it', 'google-maps-widget') . '</a>';
|
602 |
echo ' <a href="' . esc_url($dismiss_url) . '">' . __('I already rated the plugin', 'google-maps-widget') . '</a>';
|
627 |
$js_localize = array('dialog_map_title' => __('Pick an address by drag & dropping the pin', 'google-maps-widget'),
|
628 |
'undocumented_error' => __('An undocumented error has occured. Please refresh the page and try again.', 'google-maps-widget'),
|
629 |
'bad_api_key' => __('The API key format does not look right. Please double-check it.', 'google-maps-widget'),
|
630 |
+
'dialog_promo_title' => '<img alt="' . __('Maps Widget for Google Maps PRO', 'google-maps-widget') . '" title="' . __('Maps Widget for Google Maps PRO', 'google-maps-widget') . '" src="' . GMW_PLUGIN_URL . 'images/gmw-logo-pro-dialog.png' . '">',
|
631 |
'dialog_pins_title' => __('Pins Library', 'google-maps-widget'),
|
632 |
+
'plugin_name' => __('Maps Widget for Google Maps', 'google-maps-widget'),
|
633 |
'id_base' => 'googlemapswidget',
|
634 |
'map_picker_not_active' => __('Drag&drop address picking interface is a PRO feature. Interested in switching to PRO?', 'google-maps-widget'),
|
635 |
'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'),
|
639 |
'settings_url' => admin_url('options-general.php?page=gmw_options'),
|
640 |
'nonce_test_api_key' => wp_create_nonce('gmw_test_api_key'),
|
641 |
'nonce_activate_license_key' => wp_create_nonce('gmw_activate_license_key'),
|
642 |
+
'deactivate_confirmation' => __('Are you sure you want to deactivate Maps Widget for Google Maps?' . "\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'));
|
|
|
643 |
|
644 |
if (GMW::is_plugin_admin_page('widgets') || GMW::is_plugin_admin_page('settings') || is_customize_preview()) {
|
645 |
wp_enqueue_script('jquery-ui-tabs');
|
695 |
// reset all pointers to default state - visible
|
696 |
static function reset_pointers() {
|
697 |
$pointers = array();
|
698 |
+
$pointers['welcome'] = array('target' => '#menu-appearance', 'edge' => 'left', 'align' => 'right', 'content' => 'Thank you for installing <b>Maps Widget for Google Maps</b>! Please open <a href="' . admin_url('widgets.php'). '">Appearance - Widgets</a> to create your first map in seconds.');
|
699 |
|
700 |
set_transient('gmw_pointers', $pointers, 60 * DAY_IN_SECONDS);
|
701 |
} // reset_pointers
|
706 |
check_ajax_referer('gmw_dismiss_pointer');
|
707 |
|
708 |
$pointers = get_transient('gmw_pointers');
|
709 |
+
|
710 |
+
$pointer = substr(sanitize_key(@$_POST['pointer']), 0, 64);
|
711 |
|
712 |
if (empty($pointers) || empty($pointers[$pointer])) {
|
713 |
wp_send_json_error();
|
897 |
$plugin = plugin_basename(__FILE__);
|
898 |
$update_url = wp_nonce_url(admin_url('update.php?action=upgrade-plugin&plugin=' . urlencode($plugin)), 'upgrade-plugin_' . $plugin );
|
899 |
$out .= '<div class="after_activate" ' . $visible . '>';
|
900 |
+
$out .= '<p class="center">Thank you for purchasing Maps Widget for Google Maps <b class="gmw-pro-red">PRO</b>! Your license has been verified and activated.</p><p class="center">Please <b>click the button below</b> to update plugin files to PRO version.</p>';
|
901 |
+
$out .= '<p class="center"><a href="' . esc_url($update_url) . '" class="button button-primary">Update Maps Widget for Google Maps</a></p>';
|
902 |
$out .= '</div>';
|
903 |
|
904 |
$out .= '</div>'; // content
|
959 |
$out .= '</div>';
|
960 |
$out .= '</div>'; // pro features screen
|
961 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
962 |
$out .= '</div>'; // dialog
|
963 |
} // promo dialog
|
964 |
|
980 |
// complete options screen markup
|
981 |
static function settings_screen() {
|
982 |
if (!current_user_can('manage_options')) {
|
983 |
+
wp_die('Cheating? You don\'t have the right to access this page.', 'Maps Widget for Google Maps', array('back_link' => true));
|
984 |
}
|
985 |
|
986 |
$options = GMW::get_options();
|
987 |
|
988 |
echo '<div class="wrap gmw-options">';
|
989 |
+
echo '<h1><img alt="' . __('Maps Widget for Google Maps', 'google-maps-widget') . '" title="' . __('Maps Widget for Google Maps', 'google-maps-widget') . '" height="55" src="' . GMW_PLUGIN_URL . 'images/gmw-logo.png"></h1>';
|
990 |
|
991 |
echo '<form method="post" action="options.php">';
|
992 |
settings_fields(GMW::$options);
|
1005 |
|
1006 |
echo '<table class="form-table disabled">';
|
1007 |
echo '<tr>
|
1008 |
+
<th scope="row"><label for="widget_id">' . __('Maps Widget for Google Maps', 'google-maps-widget') . '</label></th>
|
1009 |
<td><select disabled="disabled" name="' . GMW::$options . '[widget_id]" id="widget_id">';
|
1010 |
echo '<option value="">- select the widget to import pins to -</option>';
|
1011 |
echo '</select><br><span class="description">Choose a widget you want to import pins to. Any existing pins will be overwritten with the new pins. Other widget options will not be altered in any way.</span></td></tr>';
|
1048 |
echo '<table class="form-table disabled">';
|
1049 |
echo '<tr>
|
1050 |
<th scope="row"><label for="sc_map">' . __('Map Shortcode', 'google-maps-widget') . '</label></th>
|
1051 |
+
<td><input class="regular-text" name="' . GMW::$options . '[sc_map]" type="text" id="sc_map" value="' . esc_attr($options['sc_map']) . '" disabled="disabled" placeholder="Map shortcode" required="required" oninvalid="this.setCustomValidity(\'Please enter the shortcode you want to use for Maps Widget for Google Maps maps.\')" oninput="setCustomValidity(\'\')">
|
1052 |
<p class="description">If the default shortcode "gmw" is taken by another plugin change it to something else, eg: "gmaps".</p></td>
|
1053 |
</tr>';
|
1054 |
echo '<tr>
|
1091 |
echo '<tr>
|
1092 |
<th scope="row"><span>' . __('Export widgets', 'google-maps-widget') . '</span></th>
|
1093 |
<td><a href="#" class="button button-secondary button-disabled">Download export file</a>
|
1094 |
+
<p class="description">The export file will only contain Maps Widget for Maps Widget for Google Maps. This includes active (in sidebars) widgets and inactive ones as well.</p></td>
|
1095 |
</tr>';
|
1096 |
echo '<tr>
|
1097 |
<th scope="row"><span>' . __('Import widgets', 'google-maps-widget') . '</span></th>
|
1098 |
<td><input type="file" disabled="disabled" name="gmw_widgets_import" id="gmw_widgets_import" accept=".txt">
|
1099 |
<input type="button" disabled="disabled" name="submit-import" id="submit-import" class="button button-secondary button-large" value="Import widgets">';
|
1100 |
+
echo '<p class="description">Only use TXT export files generated by Maps Widget for Google Maps.<br>
|
1101 |
Existing GMW widgets will not be overwritten nor any other widgets touched. If you renamed a sidebar or old one no longer exists widgets will be placed in the inactive widgets area.</p></td>
|
1102 |
</tr>';
|
1103 |
echo '</table>';
|
1108 |
$plugin = plugin_basename(__FILE__);
|
1109 |
$update_url = wp_nonce_url(admin_url('update.php?action=upgrade-plugin&plugin=' . urlencode($plugin)), 'upgrade-plugin_' . $plugin );
|
1110 |
|
1111 |
+
echo '<p>Your <b class="gmw-pro-red">PRO</b> license is validated & active. Please update the plugin to activate PRO features. In case of any problems, contact <a href="mailto:gmw@webfactoryltd.com?subject=Update%20problem" title="Contact Maps Widget for Google Maps PRO support">support</a>.</p>';
|
1112 |
+
echo '<p><a href="' . esc_url($update_url) . '" class="button button-primary">Update Maps Widget for Google Maps</a></p>';
|
1113 |
} else {
|
1114 |
echo '<p>If you already bought the <b class="gmw-pro-red">PRO</b> license please <a href="#" data-target-screen="gmw_dialog_activate" class="open_promo_dialog">enter your license key</a> to activate it.</p>';
|
1115 |
echo '<p>Interested in a lifetime <b class="gmw-pro-red">PRO</b> license that offers more than 50 extra fetures? <a href="#" class="open_promo_dialog button button-primary">Upgrade now!</a></p>';
|
1118 |
echo '</div>'; // license tab
|
1119 |
|
1120 |
echo '</form>';
|
|
|
|
|
|
|
1121 |
echo '</div>'; // wrap
|
1122 |
} // settings_screen
|
1123 |
|
1126 |
static function activate_license_key_ajax() {
|
1127 |
check_ajax_referer('gmw_activate_license_key');
|
1128 |
|
1129 |
+
$code = substr(sanitize_key(@$_POST['code']), 0, 64);
|
1130 |
+
$code = str_replace(' ', '', $code);
|
1131 |
|
1132 |
if (strlen($code) < 6 || strlen($code) > 50) {
|
1133 |
wp_send_json_error(__('Please double-check the license key. The format is not valid.', 'google-maps-widget'));
|
1243 |
} // update_details
|
1244 |
|
1245 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1246 |
// helper function for creating dropdowns
|
1247 |
static function create_select_options($options, $selected = null, $output = true) {
|
1248 |
$out = "\n";
|
1370 |
} // foreach
|
1371 |
}
|
1372 |
|
1373 |
+
if ($plugin_info = get_transient('wf-plugin-info-' . $plugin_slug)) {
|
|
|
1374 |
array_unshift($res->plugins, $plugin_info);
|
1375 |
} else {
|
1376 |
$plugin_info = plugins_api('plugin_information', array(
|
images/gmw-logo.png
CHANGED
Binary file
|
js/gmw-admin-plugins.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*
|
2 |
-
* Google Maps
|
3 |
-
* (c) Web factory Ltd, 2012 -
|
4 |
*/
|
5 |
|
6 |
|
1 |
/*
|
2 |
+
* Maps Widget for Google Maps
|
3 |
+
* (c) Web factory Ltd, 2012 - 2019
|
4 |
*/
|
5 |
|
6 |
|
js/gmw-admin-pointers.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*
|
2 |
-
* Google Maps
|
3 |
-
* (c) Web factory Ltd, 2012 -
|
4 |
*/
|
5 |
|
6 |
|
@@ -14,7 +14,7 @@ jQuery(document).ready(function($){
|
|
14 |
return true;
|
15 |
}
|
16 |
$(pointer.target).pointer({
|
17 |
-
content: '<h3>Google Maps
|
18 |
position: {
|
19 |
edge: pointer.edge,
|
20 |
align: pointer.align
|
1 |
/*
|
2 |
+
* Maps Widget for Google Maps
|
3 |
+
* (c) Web factory Ltd, 2012 - 2019
|
4 |
*/
|
5 |
|
6 |
|
14 |
return true;
|
15 |
}
|
16 |
$(pointer.target).pointer({
|
17 |
+
content: '<h3>Maps Widget for Google Maps</h3><p>' + pointer.content + '</p>',
|
18 |
position: {
|
19 |
edge: pointer.edge,
|
20 |
align: pointer.align
|
js/gmw-admin.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*
|
2 |
-
* Google Maps
|
3 |
-
* (c) Web factory Ltd, 2012 -
|
4 |
*/
|
5 |
|
6 |
|
@@ -294,18 +294,7 @@ jQuery(function($) {
|
|
294 |
}); // go to PRO features click
|
295 |
|
296 |
|
297 |
-
|
298 |
-
$('.gmw_goto_trial').on('click', function(e) {
|
299 |
-
e.preventDefault();
|
300 |
-
|
301 |
-
$('.gmw_promo_dialog_screen').hide();
|
302 |
-
$('#gmw_dialog_trial').show();
|
303 |
-
|
304 |
-
return false;
|
305 |
-
}); // go to trial click
|
306 |
-
|
307 |
-
|
308 |
-
// enter is pressed in license key field
|
309 |
$('#gmw_code').on('keypress', function(e) {
|
310 |
if (e.which === 13) {
|
311 |
e.preventDefault();
|
@@ -349,62 +338,6 @@ jQuery(function($) {
|
|
349 |
}); // activate button click
|
350 |
|
351 |
|
352 |
-
// get trial click
|
353 |
-
$('#gmw_start_trial').on('click', function(e) {
|
354 |
-
e.preventDefault();
|
355 |
-
|
356 |
-
err = false;
|
357 |
-
$('#gmw_dialog_trial input.error').removeClass('error');
|
358 |
-
$('#gmw_dialog_trial span.error').hide();
|
359 |
-
$('#gmw_dialog_trial input').addClass('gmw_disabled').addClass('gmw_spinner');
|
360 |
-
$('#gmw_start_trial').addClass('gmw_disabled');
|
361 |
-
|
362 |
-
if ($('#gmw_name').val().length < 3) {
|
363 |
-
$('#gmw_name').addClass('error');
|
364 |
-
$('#gmw_dialog_trial span.error.name').show();
|
365 |
-
$('#gmw_name').focus().select();
|
366 |
-
|
367 |
-
err = true;
|
368 |
-
} // check name
|
369 |
-
|
370 |
-
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,}))$/;
|
371 |
-
if (!re.test($('#gmw_email').val())) {
|
372 |
-
$('#gmw_email').addClass('error');
|
373 |
-
$('#gmw_dialog_trial span.error.email').show();
|
374 |
-
$('#gmw_email').focus().select();
|
375 |
-
return false;
|
376 |
-
}
|
377 |
-
|
378 |
-
if (err) {
|
379 |
-
return false;
|
380 |
-
}
|
381 |
-
|
382 |
-
$.post(ajaxurl, { 'action': 'gmw_get_trial',
|
383 |
-
'name': $('#gmw_name').val(),
|
384 |
-
'email': $('#gmw_email').val(),
|
385 |
-
'_ajax_nonce': gmw.nonce_get_trial},
|
386 |
-
function(response) {
|
387 |
-
if (response && response.success == true) {
|
388 |
-
$('.before_trial').hide();
|
389 |
-
$('.after_trial').show();
|
390 |
-
} else if (response && response.success == false && response.data) {
|
391 |
-
alert(response.data);
|
392 |
-
} else {
|
393 |
-
alert(gmw.undocumented_error);
|
394 |
-
}
|
395 |
-
}, 'json')
|
396 |
-
.fail(function() {
|
397 |
-
alert(gmw.undocumented_error);
|
398 |
-
})
|
399 |
-
.always(function() {
|
400 |
-
$('#gmw_dialog_trial input').removeClass('gmw_disabled').removeClass('gmw_spinner');
|
401 |
-
$('#gmw_start_trial').removeClass('gmw_disabled');
|
402 |
-
});
|
403 |
-
|
404 |
-
return false;
|
405 |
-
}); // get trial click
|
406 |
-
|
407 |
-
|
408 |
// open promo/activation dialog
|
409 |
function gmw_open_promo_dialog(target_screen) {
|
410 |
if (typeof wp !== 'undefined' && wp.customize) {
|
1 |
/*
|
2 |
+
* Maps Widget for Google Maps
|
3 |
+
* (c) Web factory Ltd, 2012 - 2019
|
4 |
*/
|
5 |
|
6 |
|
294 |
}); // go to PRO features click
|
295 |
|
296 |
|
297 |
+
// enter is pressed in license key field
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
$('#gmw_code').on('keypress', function(e) {
|
299 |
if (e.which === 13) {
|
300 |
e.preventDefault();
|
338 |
}); // activate button click
|
339 |
|
340 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
// open promo/activation dialog
|
342 |
function gmw_open_promo_dialog(target_screen) {
|
343 |
if (typeof wp !== 'undefined' && wp.customize) {
|
js/gmw.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*
|
2 |
-
* Google Maps
|
3 |
* (c) Web factory Ltd, 2012 - 2018
|
4 |
*/
|
5 |
|
1 |
/*
|
2 |
+
* Maps Widget for Google Maps
|
3 |
* (c) Web factory Ltd, 2012 - 2018
|
4 |
*/
|
5 |
|
readme.txt
CHANGED
@@ -1,22 +1,22 @@
|
|
1 |
-
=== Google Maps
|
2 |
Contributors: WebFactory, GoogleMapsWidget, WPReset, securityninja, underconstructionpage
|
3 |
-
Tags: google maps, maps, map, google map, google maps
|
4 |
License: GPLv2 or later
|
5 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 5.2
|
8 |
-
Stable tag: 4.
|
9 |
Requires PHP: 5.2
|
10 |
|
11 |
-
Are your Google Maps slow? Try Google Maps
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
Tired of buggy & slow Google Maps plugins that take hours to setup? With Google Maps
|
16 |
|
17 |
[youtube https://www.youtube.com/watch?v=oVrTGKepPPI]
|
18 |
|
19 |
-
Check out some examples on the <a href="https://www.gmapswidget.com/">Google Maps
|
20 |
|
21 |
|
22 |
**General Google Maps Widget options**
|
@@ -26,7 +26,7 @@ Check out some examples on the <a href="https://www.gmapswidget.com/">Google Map
|
|
26 |
|
27 |
**Thumbnail Google map options**
|
28 |
|
29 |
-
Google Maps
|
30 |
|
31 |
* Custom google map size - map width & map height
|
32 |
* Choose any google map type you prefer - road map, satellite map, terrain map, hybrid map, or custom map image to save money on API calls (PRO only)
|
@@ -47,7 +47,7 @@ Google Maps Widget thumbnail uses the Google Maps Static Maps API. It loads the
|
|
47 |
|
48 |
**Interactive Google map options**
|
49 |
|
50 |
-
Interactive google maps loads in a lightbox or as an in-place replacement for the thumbnail Google map if your using Google Maps
|
51 |
|
52 |
* lightbox size - map width & map height (auto-adjusted on smaller screens) or fullscreen map in PRO
|
53 |
* map mode - place + in PRO: directions, search, view & google street view
|
@@ -72,23 +72,23 @@ Interactive google maps loads in a lightbox or as an in-place replacement for th
|
|
72 |
* every map pin has the following options: show on the map thumbnail and/or interactive map, set custom map pin image, set on-click behavior: open custom description bubble, open URL in new/same tab or do nothing
|
73 |
|
74 |
|
75 |
-
> > **PRO** version of Google Maps
|
76 |
|
77 |
|
78 |
-
**Showcase & What others say about Google Maps
|
79 |
|
80 |
-
* see a live example of Google Maps
|
81 |
* voted on the <a href="http://themesplugins.com/Plugin-detail/google-maps-widget-google-map-free-plugin-for-wordpress/" title="Top 100 WordPressian plugin">Top 100 List</a> by WordPressian
|
82 |
* made it on the <a href="http://tidyrepo.com/google-maps-widget/">Tidy Repo</a> as "well supported Google Maps plugin"
|
83 |
* reviewed 5/5 by <a href="http://websmush.com/google-maps-widget-plugin-review/">Web Smush</a>
|
84 |
* one of 3 best Google map plugins by <a href="http://torquemag.io/the-3-best-map-plugins-for-wordpress/">The Torque Mag</a>
|
85 |
* "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>
|
86 |
* <a href="http://designscrazed.org/wordpress-google-map-plugins/">Design Crazed</a> puts in on the top 20 Google maps list
|
87 |
-
* <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 Google Maps
|
88 |
* <a href="http://www.indexwp.com/google-maps-widget/">IndexWP</a> calls it a "handy google maps plugin"
|
89 |
* <a href="https://www.webhostingsecretrevealed.net/blog/wordpress-blog/an-easy-and-painless-guide-for-adding-google-map-in-wordpress/">A Painless Guide For Adding Google Maps In WordPress</a> by WHSR
|
90 |
|
91 |
-
**Google Maps
|
92 |
|
93 |
* English - original :)
|
94 |
* Swedish - Sofia Asklund
|
@@ -112,19 +112,19 @@ Interactive google maps loads in a lightbox or as an in-place replacement for th
|
|
112 |
|
113 |
== Installation ==
|
114 |
|
115 |
-
**Follow the usual routine to install Google Maps
|
116 |
|
117 |
1. Open WordPress admin, go to Plugins, click Add New
|
118 |
-
2. Enter "Google Maps
|
119 |
3. Plugin will show up as the first on the list, click "Install Now"
|
120 |
-
4. Activate & go to Appearance - Widgets to configure Google Maps
|
121 |
|
122 |
**Or if needed, upload manually**
|
123 |
|
124 |
1. Download the plugin.
|
125 |
2. Unzip it and upload to _wp-content/plugin/_
|
126 |
-
3. Open WordPress admin - Plugins and click "Activate" next to the Google Maps
|
127 |
-
4. Configure the Google Maps
|
128 |
|
129 |
|
130 |
== Frequently Asked Questions ==
|
@@ -140,25 +140,25 @@ Write the address differently, or more precisely. Make sure you enter the street
|
|
140 |
= How to generate the API key =
|
141 |
|
142 |
We understand that creating a Google Maps API key is frustrating but it takes less than a minute and it's something Google requires.
|
143 |
-
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 Google Maps API 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 Google Maps
|
144 |
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.
|
145 |
If that didn't help read our detailed guide on <a href="https://www.gmapswidget.com/documentation/generate-google-maps-api-key/">how to create a Google Maps API key</a>.
|
146 |
|
147 |
= Google map thumbnail works but lightbox won't open on click =
|
148 |
|
149 |
-
You probably have Fancybox JS and CSS files included twice; once by the theme and second time by Google Maps
|
150 |
|
151 |
= The Google map is not working!!! Arrrrrrrrr =
|
152 |
|
153 |
Open a new thread in the <a href="http://wordpress.org/support/plugin/google-maps-widget">support forums</a> but please bear in mind that support is community based and we do this in our spare time.
|
154 |
|
155 |
-
= How do I get Google Maps
|
156 |
|
157 |
Simply visit <a href="https://www.gmapswidget.com">gmapswidget.com</a> and purchase the GMW PRO. Yearly and lifetime licenses are available.
|
158 |
|
159 |
= I've installed the plugin, now what? =
|
160 |
|
161 |
-
In WordPress admin open Appearance - Widgets and add a Google Maps
|
162 |
|
163 |
= How do I put a Google map on my page/post? =
|
164 |
|
@@ -181,6 +181,11 @@ Try <a href="http://www.niftymaps.co">Nifty Maps</a> - a comprehensive Map Build
|
|
181 |
|
182 |
== Changelog ==
|
183 |
|
|
|
|
|
|
|
|
|
|
|
184 |
= 4.15 =
|
185 |
* 2019/05/27
|
186 |
* added Paper thumbnail color scheme
|
1 |
+
=== Maps Widget for Google Maps - Best Maps Plugin ===
|
2 |
Contributors: WebFactory, GoogleMapsWidget, WPReset, securityninja, underconstructionpage
|
3 |
+
Tags: google maps, maps, map, google map, google maps widget, map markers, wp google maps, wp google map, map plugin, directions, google map plugin, map widget
|
4 |
License: GPLv2 or later
|
5 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 5.2
|
8 |
+
Stable tag: 4.16
|
9 |
Requires PHP: 5.2
|
10 |
|
11 |
+
Are your Google Maps slow? Try Map Widget for Google Maps. You'll have a fast Google Maps widget with a thumbnail & lightbox in minutes!
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
Tired of buggy & slow Google Maps plugins that take hours to setup? With Maps Widget for Google Maps you'll have a perfect map with a thumbnail & lightbox in minutes! **No nonsense Google maps - we know you're in a hurry!** Join 100,000+ happy Google maps users. If you've already switched to Gutenberg grab our free <a href="https://wordpress.org/plugins/map-block-gutenberg/">Google Maps Gutenberg Block</a> plugin.
|
16 |
|
17 |
[youtube https://www.youtube.com/watch?v=oVrTGKepPPI]
|
18 |
|
19 |
+
Check out some examples on the <a href="https://www.gmapswidget.com/">Maps Widget for Google Maps site</a> or give us a shout on Twitter <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>.
|
20 |
|
21 |
|
22 |
**General Google Maps Widget options**
|
26 |
|
27 |
**Thumbnail Google map options**
|
28 |
|
29 |
+
Maps Widget for Google Maps thumbnail uses the Google Maps Static Maps API. It loads the entire google map in only one request compared to 20+ requests it takes other Google maps plugins to load them. This ensures your site loads as fast as possible!
|
30 |
|
31 |
* Custom google map size - map width & map height
|
32 |
* Choose any google map type you prefer - road map, satellite map, terrain map, hybrid map, or custom map image to save money on API calls (PRO only)
|
47 |
|
48 |
**Interactive Google map options**
|
49 |
|
50 |
+
Interactive google maps loads in a lightbox or as an in-place replacement for the thumbnail Google map if your using Maps Widget for Google Maps PRO. It has all the standard interactive google map features users are accustomed too.
|
51 |
|
52 |
* lightbox size - map width & map height (auto-adjusted on smaller screens) or fullscreen map in PRO
|
53 |
* map mode - place + in PRO: directions, search, view & google street view
|
72 |
* every map pin has the following options: show on the map thumbnail and/or interactive map, set custom map pin image, set on-click behavior: open custom description bubble, open URL in new/same tab or do nothing
|
73 |
|
74 |
|
75 |
+
> > **PRO** version of Maps Widget for Google Maps offers more than 50 extra features and options including multiple map pins support, map pin clustering, pins library, skins, export, import and widget cloning features, Google Analytics integration and premium, USA based support. Read more about the PRO version on the <a href="https://www.gmapswidget.com/">official Maps Widget for Google Maps site</a>.
|
76 |
|
77 |
|
78 |
+
**Showcase & What others say about Maps Widget for Google Maps**
|
79 |
|
80 |
+
* see a live example of Maps Widget for Google Maps showing off server locations around the world on <a href="http://www.bitcatcha.com/">Bitcatcha</a>
|
81 |
* voted on the <a href="http://themesplugins.com/Plugin-detail/google-maps-widget-google-map-free-plugin-for-wordpress/" title="Top 100 WordPressian plugin">Top 100 List</a> by WordPressian
|
82 |
* made it on the <a href="http://tidyrepo.com/google-maps-widget/">Tidy Repo</a> as "well supported Google Maps plugin"
|
83 |
* reviewed 5/5 by <a href="http://websmush.com/google-maps-widget-plugin-review/">Web Smush</a>
|
84 |
* one of 3 best Google map plugins by <a href="http://torquemag.io/the-3-best-map-plugins-for-wordpress/">The Torque Mag</a>
|
85 |
* "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>
|
86 |
* <a href="http://designscrazed.org/wordpress-google-map-plugins/">Design Crazed</a> puts in on the top 20 Google maps list
|
87 |
+
* <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 Maps Widget for Google Maps
|
88 |
* <a href="http://www.indexwp.com/google-maps-widget/">IndexWP</a> calls it a "handy google maps plugin"
|
89 |
* <a href="https://www.webhostingsecretrevealed.net/blog/wordpress-blog/an-easy-and-painless-guide-for-adding-google-map-in-wordpress/">A Painless Guide For Adding Google Maps In WordPress</a> by WHSR
|
90 |
|
91 |
+
**Maps Widget for Google Maps Translators (thank you!)**
|
92 |
|
93 |
* English - original :)
|
94 |
* Swedish - Sofia Asklund
|
112 |
|
113 |
== Installation ==
|
114 |
|
115 |
+
**Follow the usual routine to install Maps Widget for Google Maps**
|
116 |
|
117 |
1. Open WordPress admin, go to Plugins, click Add New
|
118 |
+
2. Enter "Maps Widget for Google Maps" in search and hit Enter
|
119 |
3. Plugin will show up as the first on the list, click "Install Now"
|
120 |
+
4. Activate & go to Appearance - Widgets to configure Maps Widget for Google Maps
|
121 |
|
122 |
**Or if needed, upload manually**
|
123 |
|
124 |
1. Download the plugin.
|
125 |
2. Unzip it and upload to _wp-content/plugin/_
|
126 |
+
3. Open WordPress admin - Plugins and click "Activate" next to the Maps Widget for Google Maps plugin
|
127 |
+
4. Configure the Maps Widget for Google Maps under Appearance - Widgets
|
128 |
|
129 |
|
130 |
== Frequently Asked Questions ==
|
140 |
= How to generate the API key =
|
141 |
|
142 |
We understand that creating a Google Maps API key is frustrating but it takes less than a minute and it's something Google requires.
|
143 |
+
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 Google Maps API 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 Maps Widget for Google Maps settings.
|
144 |
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.
|
145 |
If that didn't help read our detailed guide on <a href="https://www.gmapswidget.com/documentation/generate-google-maps-api-key/">how to create a Google Maps API key</a>.
|
146 |
|
147 |
= Google map thumbnail works but lightbox won't open on click =
|
148 |
|
149 |
+
You probably have Fancybox JS and CSS files included twice; once by the theme and second time by Maps Widget for Google Maps plugin. Remove one instance of files. If that's not the case then you have a fatal JS error that's preventing execution of other JS code. Hit F12 in Firefox or Chrome and have a look at the debug console. If there are any red lines - it's a fatal error.
|
150 |
|
151 |
= The Google map is not working!!! Arrrrrrrrr =
|
152 |
|
153 |
Open a new thread in the <a href="http://wordpress.org/support/plugin/google-maps-widget">support forums</a> but please bear in mind that support is community based and we do this in our spare time.
|
154 |
|
155 |
+
= How do I get Maps Widget for Google Maps Pro? =
|
156 |
|
157 |
Simply visit <a href="https://www.gmapswidget.com">gmapswidget.com</a> and purchase the GMW PRO. Yearly and lifetime licenses are available.
|
158 |
|
159 |
= I've installed the plugin, now what? =
|
160 |
|
161 |
+
In WordPress admin open Appearance - Widgets and add a Maps Widget for Google Maps to a sidebar. And make sure you follow instructions on how to generate a Google Maps API key. Without it maps won't work.
|
162 |
|
163 |
= How do I put a Google map on my page/post? =
|
164 |
|
181 |
|
182 |
== Changelog ==
|
183 |
|
184 |
+
= 4.16 =
|
185 |
+
* 2019/07/31
|
186 |
+
* changed name from Google Maps Widget to Maps Widget for Google Maps
|
187 |
+
* removed old trial code
|
188 |
+
|
189 |
= 4.15 =
|
190 |
* 2019/05/27
|
191 |
* added Paper thumbnail color scheme
|