Google Maps Widget – Ultimate Google Maps Plugin - Version 3.45

Version Description

  • 2016/10/24
  • new prices, trial 14 days
  • welcome pointer added
  • minor bug fixes
Download this release

Release Info

Developer WebFactory
Plugin Icon 128x128 Google Maps Widget – Ultimate Google Maps Plugin
Version 3.45
Comparing to
See all releases

Code changes from version 3.40 to 3.45

Files changed (4) hide show
  1. gmw-widget.php +2 -1
  2. google-maps-widget.php +71 -23
  3. js/gmw-admin-pointers.js +32 -0
  4. readme.txt +21 -7
gmw-widget.php CHANGED
@@ -124,6 +124,7 @@ class GoogleMapsWidget extends WP_Widget {
124
  $thumb_link_types = array(array('val' => 'lightbox', 'label' => __('Interactive map in lightbox (default)', 'google-maps-widget')),
125
  array('val' => '-1', 'label' => __('Replace thumb map with an interactive map', 'google-maps-widget')),
126
  array('val' => '-1', 'label' => __('Interactive map in a new window', 'google-maps-widget')),
 
127
  array('val' => 'custom', 'label' => __('Custom URL', 'google-maps-widget')),
128
  array('val' => '-1', 'label' => __('Custom URL in a new window', 'google-maps-widget')),
129
  array('val' => 'nolink', 'label' => __('Disable link', 'google-maps-widget')));
@@ -547,4 +548,4 @@ class GoogleMapsWidget extends WP_Widget {
547
  return $instance;
548
  } // upgrade_widget_instance
549
  } // class GoogleMapsWidget
550
- endif;
124
  $thumb_link_types = array(array('val' => 'lightbox', 'label' => __('Interactive map in lightbox (default)', 'google-maps-widget')),
125
  array('val' => '-1', 'label' => __('Replace thumb map with an interactive map', 'google-maps-widget')),
126
  array('val' => '-1', 'label' => __('Interactive map in a new window', 'google-maps-widget')),
127
+ array('val' => '-1', 'label' => __('Skip thumbnail map, immediately show interactive one', 'google-maps-widget')),
128
  array('val' => 'custom', 'label' => __('Custom URL', 'google-maps-widget')),
129
  array('val' => '-1', 'label' => __('Custom URL in a new window', 'google-maps-widget')),
130
  array('val' => 'nolink', 'label' => __('Disable link', 'google-maps-widget')));
548
  return $instance;
549
  } // upgrade_widget_instance
550
  } // class GoogleMapsWidget
551
+ endif;
google-maps-widget.php CHANGED
@@ -3,8 +3,8 @@
3
  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 in a lightbox. Includes a user-friendly interface and numerous appearance options.
6
- Author: Web factory Ltd
7
- Version: 3.40
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: google-maps-widget
10
  Domain Path: lang
@@ -85,6 +85,7 @@ class GMW {
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
 
89
  // custom admin actions
90
  add_action('admin_action_gmw_dismiss_notice', array('GMW', 'dismiss_notice'));
@@ -132,7 +133,6 @@ class GMW {
132
 
133
  // sanitize settings on save
134
  static function sanitize_settings($values) {
135
- $new_values = array();
136
  $old_options = GMW::get_options();
137
 
138
  foreach ($values as $key => $value) {
@@ -252,14 +252,21 @@ class GMW {
252
  // get users maps api key or one of temporary plugin ones
253
  static function get_api_key($type = 'static') {
254
  $options = GMW::get_options();
255
- $default_api_keys = array('AIzaSyB35Ukt8bKRSY-mII-1Q7DmVx8LnlpmND0',
256
- 'AIzaSyDlGWq9fCAJopqM0FakFvUWH0J52-tr3UM',
257
  'AIzaSyArcXkQ15FoOTS2Z7El2SJHDIlTMW7Rxxg',
258
  'AIzaSyBVJ4JR63d1JIL8L6b_emat-_jXMcHveR0',
259
  'AIzaSyDOobziwX_9-4JuAgqIlTUZgXAss7zIIEM',
260
  'AIzaSyBkMYtzfCn08icKNrr_-XySw7o8Bky0P94',
 
 
 
 
261
  'AIzaSyAkdW5Zp4O-96nZyFKq13UUgIHY9Yabvg8');
262
-
 
 
 
 
263
  if (!empty($options['api_key'])) {
264
  return $options['api_key'];
265
  } else {
@@ -496,14 +503,13 @@ class GMW {
496
 
497
  // API key notification is shown only on GMW settings page
498
  // disabled as a test in v3.35+
499
- if (0 && !GMW::get_api_key('static') && GMW::is_plugin_admin_page('settings')) {
500
  add_action('admin_notices', array('GMW', 'notice_api_key'));
501
  } // show api key notice
502
 
503
  // rating notification is shown after 7 days if you have active widgets
504
  if (!$notice && empty($options['dismiss_notice_rate']) &&
505
  GMW_tracking::count_active_widgets() > 0 &&
506
- GMW::is_plugin_admin_page('widgets') &&
507
  (current_time('timestamp') - $options['first_install']) > (DAY_IN_SECONDS * 7)) {
508
  add_action('admin_notices', array('GMW', 'notice_rate_plugin'));
509
  $notice = true;
@@ -521,12 +527,12 @@ class GMW {
521
 
522
  // display message to get pro features for GMW
523
  static function notice_upgrade() {
524
- $promo_delta = 3 * HOUR_IN_SECONDS;
525
  $options = GMW::get_options();
526
  $activate_url = admin_url('options-general.php?page=gmw_options&gmw_open_promo_dialog');
527
  $dismiss_url = add_query_arg(array('action' => 'gmw_dismiss_notice', 'notice' => 'upgrade', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
528
 
529
- echo '<div id="gmw_activate_notice" class="updated notice"><p>' . __('<b>Google Maps Widget <span style="color: #d54e21;">PRO</span></b> has more than 50 extra features &amp; options. Our support is fast &amp; friendly and licenses are valid for an unlimited number of sites.</p>', 'google-maps-widget');
530
 
531
  if (current_time('timestamp') - $options['first_install'] < $promo_delta) {
532
  $time = date(get_option('time_format'), $options['first_install'] + $promo_delta);
@@ -624,7 +630,44 @@ class GMW {
624
  wp_enqueue_script('gmw-admin-plugins', GMW_PLUGIN_URL . 'js/gmw-admin-plugins.js', array('jquery'), GMW::$version, true);
625
  wp_localize_script('gmw-admin-plugins', 'gmw', $js_localize);
626
  }
 
 
 
 
 
 
 
 
 
 
627
  } // admin_enqueue_scripts
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
628
 
629
 
630
  // check if plugin's admin page is shown
@@ -724,17 +767,17 @@ class GMW {
724
  $out .= '<div class="gmw-promo-box gmw-promo-box-agency gmw_goto_activation">
725
  <div class="gmw-promo-icon"><img src="' . GMW_PLUGIN_URL . 'images/icon-agency.png" alt="Unlimited Agency Lifetime License" title="Unlimited Agency Lifetime License"></div>
726
  <div class="gmw-promo-description"><h3>Unlimited Agency License</h3><br>
727
- <span>Unlimited Client &amp; Personal Sites<br>Lifetime Support + Lifetime Upgrades</span></div>';
728
  if ($promo_active) {
729
- $out .= '<div class="gmw-promo-button gmw-promo-button-extra"><a href="http://www.gmapswidget.com/buy/?p=pro-agency-welcome&r=welcome-GMW+v' . GMW::$version . '" target="_blank">only <strike>$67</strike> $49</a><span>discount: 25%</span></div>';
730
  } else {
731
- $out .= '<div class="gmw-promo-button"><a href="http://www.gmapswidget.com/buy/?p=pro-agency&r=GMW+v' . GMW::$version . '" data-noprevent="1" target="_blank">BUY $67</a></div>';
732
  }
733
  $out .= '</div>';
734
  $out .= '<div class="gmw-promo-box gmw-promo-box-lifetime gmw_goto_activation gmw-promo-box-hover">
735
  <div class="gmw-promo-icon"><img src="' . GMW_PLUGIN_URL . 'images/icon-unlimited.png" alt="Unlimited Lifetime License" title="Unlimited Lifetime License"></div>
736
  <div class="gmw-promo-description"><h3>Unlimited Personal License</h3><br>
737
- <span>Unlimited personal sites<br>Lifetime support + Lifetime Upgrades</span></div>';
738
  if ($promo_active) {
739
  $out .= '<div class="gmw-promo-button gmw-promo-button-extra"><a href="http://www.gmapswidget.com/buy/?p=pro-welcome2&r=welcome-GMW+v' . GMW::$version . '" target="_blank">only <strike>$39</strike> $29</a><span>discount: 25%</span></div>';
740
  } else {
@@ -744,12 +787,12 @@ class GMW {
744
  $out .= '<div class="gmw-promo-box gmw-promo-box-yearly gmw_goto_activation">
745
  <div class="gmw-promo-icon"><img src="' . GMW_PLUGIN_URL . 'images/icon-yearly.png" alt="Yearly License" title="Yearly License"></div>
746
  <div class="gmw-promo-description"><h3>Single Site License</h3><br>
747
- <span>1 Site + 1 Year of Support &amp; Upgrades</span></div>
748
- <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>
749
  </div>';
750
  $out .= '<div class="gmw-promo-box gmw-promo-box-trial gmw_goto_trial">
751
- <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>
752
- <div class="gmw-promo-description"><h3>7 Days Free Trial</h3><br>
753
  <span>Still on the fence? Test PRO for free NOW</span></div>
754
  <div class="gmw-promo-button"><a href="#">Start</a></div>
755
  </div>';
@@ -850,7 +893,7 @@ class GMW {
850
  <span style="display: none;" class="error email">Please double check your email address.</span>
851
  </p>';
852
  $out .= '<p class="center">
853
- <a id="gmw_start_trial" href="#" class="button button-primary">Start my 7 days free trial</a>
854
  <p class="center">Or <a href="#" class="gmw_goto_intro">go PRO now</a></p>
855
  </p>';
856
  $out .= '</div>'; // before_trial
@@ -922,9 +965,8 @@ class GMW {
922
  <th scope="row"><label for="api_key">' . __('Google Maps API Key', 'google-maps-widget') . '</label></th>
923
  <td><input name="' . GMW::$options . '[api_key]" type="text" id="api_key" value="' . esc_attr($options['api_key']) . '" class="regular-text" placeholder="Google Maps API key" oninput="setCustomValidity(\'\')" oninvalid="this.setCustomValidity(\'Please use Google Developers Console to generate an API key and enter it here. It is completely free.\')"> <a href="#" class="button button-secondary gmw-test-api-key">Test API key</a>
924
  <p class="description">New Google Maps usage policy dictates that everyone using the maps should register for a free API key.<br>
925
- Please create a key for "Google Static Maps API" and "Google Maps Embed API" using the <a href="https://console.developers.google.com/project" target="blank">Google Developers Console</a>.<br>
926
- Or use <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, click next a few times &amp; copy the key. 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> and select the same "My Project".<br>
927
- If you want to protect your API key by using the "Accept requests from these HTTP referrers" option in Google Console add your domain<br>in these two formats: *.mydomain.com/* and mydomain.com/*</p></td>
928
  </tr>';
929
  echo '</table>';
930
  echo get_submit_button(__('Save Settings', 'google-maps-widget'));
@@ -1282,6 +1324,8 @@ class GMW {
1282
  $options['last_tracking'] = false;
1283
  GMW::set_options($options);
1284
  }
 
 
1285
  } // activate
1286
 
1287
 
@@ -1292,6 +1336,8 @@ class GMW {
1292
  if (isset($options['allow_tracking']) && $options['allow_tracking'] === true) {
1293
  GMW_tracking::clear_cron();
1294
  }
 
 
1295
  } // deactivate
1296
 
1297
 
@@ -1301,6 +1347,8 @@ class GMW {
1301
  if (false) {
1302
  delete_option(GMW::$options);
1303
  }
 
 
1304
  } // uninstall
1305
  } // class GMW
1306
 
@@ -1313,4 +1361,4 @@ register_deactivation_hook(__FILE__, array('GMW', 'deactivate'));
1313
  register_uninstall_hook(__FILE__, array('GMW', 'uninstall'));
1314
  add_action('init', array('GMW', 'init'));
1315
  add_action('plugins_loaded', array('GMW', 'plugins_loaded'));
1316
- add_action('widgets_init', array('GMW', 'widgets_init'));
3
  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 in a lightbox. Includes a user-friendly interface and numerous appearance options.
6
+ Author: Web Factory Ltd
7
+ Version: 3.45
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: google-maps-widget
10
  Domain Path: lang
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
 
90
  // custom admin actions
91
  add_action('admin_action_gmw_dismiss_notice', array('GMW', 'dismiss_notice'));
133
 
134
  // sanitize settings on save
135
  static function sanitize_settings($values) {
 
136
  $old_options = GMW::get_options();
137
 
138
  foreach ($values as $key => $value) {
252
  // get users maps api key or one of temporary plugin ones
253
  static function get_api_key($type = 'static') {
254
  $options = GMW::get_options();
255
+ $default_api_keys = array('AIzaSyDlGWq9fCAJopqM0FakFvUWH0J52-tr3UM',
 
256
  'AIzaSyArcXkQ15FoOTS2Z7El2SJHDIlTMW7Rxxg',
257
  'AIzaSyBVJ4JR63d1JIL8L6b_emat-_jXMcHveR0',
258
  'AIzaSyDOobziwX_9-4JuAgqIlTUZgXAss7zIIEM',
259
  'AIzaSyBkMYtzfCn08icKNrr_-XySw7o8Bky0P94',
260
+ 'AIzaSyAM8Az0e4CuP9Tuh0wgQZ6INzTgDGxSH_8',
261
+ 'AIzaSyAL4eEFtz2wS9G6F3jz1Gb9j-BPC-ynR7w',
262
+ 'AIzaSyDpV3BwEhOGCQcKmCvtYLre7sVu6wMpz3c',
263
+ 'AIzaSyBwSjoVcKFI6jcgwWAgyS6ZffiJtMeIjDk',
264
  'AIzaSyAkdW5Zp4O-96nZyFKq13UUgIHY9Yabvg8');
265
+
266
+ if ($type == 'test' && strlen($options['api_key']) < 30) {
267
+ return false;
268
+ }
269
+
270
  if (!empty($options['api_key'])) {
271
  return $options['api_key'];
272
  } else {
503
 
504
  // API key notification is shown only on GMW settings page
505
  // disabled as a test in v3.35+
506
+ if (!GMW::get_api_key('test') && GMW::is_plugin_admin_page('settings')) {
507
  add_action('admin_notices', array('GMW', 'notice_api_key'));
508
  } // show api key notice
509
 
510
  // rating notification is shown after 7 days if you have active widgets
511
  if (!$notice && empty($options['dismiss_notice_rate']) &&
512
  GMW_tracking::count_active_widgets() > 0 &&
 
513
  (current_time('timestamp') - $options['first_install']) > (DAY_IN_SECONDS * 7)) {
514
  add_action('admin_notices', array('GMW', 'notice_rate_plugin'));
515
  $notice = true;
527
 
528
  // display message to get pro features for GMW
529
  static function notice_upgrade() {
530
+ $promo_delta = 2 * HOUR_IN_SECONDS;
531
  $options = GMW::get_options();
532
  $activate_url = admin_url('options-general.php?page=gmw_options&gmw_open_promo_dialog');
533
  $dismiss_url = add_query_arg(array('action' => 'gmw_dismiss_notice', 'notice' => 'upgrade', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
534
 
535
+ echo '<div id="gmw_activate_notice" class="updated notice"><p>' . __('<b>Google Maps Widget <span style="color: #d54e21;">PRO</span></b> has more than 50 extra features &amp; options. Our support is super fast &amp; friendly and with the unlimited license you can install GMW on as many sites as you need.</p>', 'google-maps-widget');
536
 
537
  if (current_time('timestamp') - $options['first_install'] < $promo_delta) {
538
  $time = date(get_option('time_format'), $options['first_install'] + $promo_delta);
630
  wp_enqueue_script('gmw-admin-plugins', GMW_PLUGIN_URL . 'js/gmw-admin-plugins.js', array('jquery'), GMW::$version, true);
631
  wp_localize_script('gmw-admin-plugins', 'gmw', $js_localize);
632
  }
633
+
634
+
635
+ $pointers = get_transient('gmw_pointers');
636
+ if ($pointers && !GMW::is_plugin_admin_page('widgets')) {
637
+ $pointers['_nonce_dismiss_pointer'] = wp_create_nonce('gmw_dismiss_pointer');
638
+ wp_enqueue_script('wp-pointer');
639
+ wp_enqueue_script('gmw-pointers', plugins_url('js/gmw-admin-pointers.js', __FILE__), array('jquery'), self::$version, true);
640
+ wp_enqueue_style('wp-pointer');
641
+ wp_localize_script('wp-pointer', 'gmw_pointers', $pointers);
642
+ }
643
  } // admin_enqueue_scripts
644
+
645
+
646
+ // reset all pointers to default state - visible
647
+ static function reset_pointers() {
648
+ $pointers = array();
649
+ $pointers['welcome'] = array('target' => '#menu-appearance', 'edge' => 'left', 'align' => 'right', 'content' => 'Thank you for installing <b>Google Maps Widget</b>! Please open <a href="' . admin_url('widgets.php'). '">Appearance - Widgets</a> to create your first map in seconds.');
650
+
651
+ set_transient('gmw_pointers', $pointers, 60 * DAY_IN_SECONDS);
652
+ } // reset_pointers
653
+
654
+
655
+ // permanently dismiss a pointer
656
+ static function dismiss_pointer_ajax() {
657
+ check_ajax_referer('gmw_dismiss_pointer');
658
+
659
+ $pointers = get_transient('gmw_pointers');
660
+ $pointer = trim($_POST['pointer']);
661
+
662
+ if (empty($pointers) || empty($pointers[$pointer])) {
663
+ wp_send_json_error();
664
+ }
665
+
666
+ unset($pointers[$pointer]);
667
+ set_transient('gmw_pointers', $pointers);
668
+
669
+ wp_send_json_success();
670
+ } // dismiss_pointer_ajax
671
 
672
 
673
  // check if plugin's admin page is shown
767
  $out .= '<div class="gmw-promo-box gmw-promo-box-agency gmw_goto_activation">
768
  <div class="gmw-promo-icon"><img src="' . GMW_PLUGIN_URL . 'images/icon-agency.png" alt="Unlimited Agency Lifetime License" title="Unlimited Agency Lifetime License"></div>
769
  <div class="gmw-promo-description"><h3>Unlimited Agency License</h3><br>
770
+ <span>Unlimited Client &amp; Personal Sites<br>Lifetime Priority Support + Lifetime Upgrades</span></div>';
771
  if ($promo_active) {
772
+ $out .= '<div class="gmw-promo-button gmw-promo-button-extra"><a href="http://www.gmapswidget.com/buy/?p=pro-agency-welcome&r=welcome-GMW+v' . GMW::$version . '" target="_blank">only <strike>$99</strike> $74</a><span>discount: 25%</span></div>';
773
  } else {
774
+ $out .= '<div class="gmw-promo-button"><a href="http://www.gmapswidget.com/buy/?p=pro-agency&r=GMW+v' . GMW::$version . '" data-noprevent="1" target="_blank">BUY $99</a></div>';
775
  }
776
  $out .= '</div>';
777
  $out .= '<div class="gmw-promo-box gmw-promo-box-lifetime gmw_goto_activation gmw-promo-box-hover">
778
  <div class="gmw-promo-icon"><img src="' . GMW_PLUGIN_URL . 'images/icon-unlimited.png" alt="Unlimited Lifetime License" title="Unlimited Lifetime License"></div>
779
  <div class="gmw-promo-description"><h3>Unlimited Personal License</h3><br>
780
+ <span>Unlimited personal sites<br> 1 Year of Support &amp; 1 Year of Upgrades</span></div>';
781
  if ($promo_active) {
782
  $out .= '<div class="gmw-promo-button gmw-promo-button-extra"><a href="http://www.gmapswidget.com/buy/?p=pro-welcome2&r=welcome-GMW+v' . GMW::$version . '" target="_blank">only <strike>$39</strike> $29</a><span>discount: 25%</span></div>';
783
  } else {
787
  $out .= '<div class="gmw-promo-box gmw-promo-box-yearly gmw_goto_activation">
788
  <div class="gmw-promo-icon"><img src="' . GMW_PLUGIN_URL . 'images/icon-yearly.png" alt="Yearly License" title="Yearly License"></div>
789
  <div class="gmw-promo-description"><h3>Single Site License</h3><br>
790
+ <span>1 Site (personal or client\'s)<br>1 Year of Support &amp; 1 Year of Upgrades</span></div>
791
+ <div class="gmw-promo-button"><a href="http://www.gmapswidget.com/buy/?p=yearly&r=GMW+v' . GMW::$version . '" data-noprevent="1" target="_blank">$15 /year</a></div>
792
  </div>';
793
  $out .= '<div class="gmw-promo-box gmw-promo-box-trial gmw_goto_trial">
794
+ <div class="gmw-promo-icon"><img src="' . GMW_PLUGIN_URL . 'images/icon-trial.png" alt="14 Days Free Trial License" title="14 Days Free Trial License"></div>
795
+ <div class="gmw-promo-description"><h3>14 Days Free Trial</h3><br>
796
  <span>Still on the fence? Test PRO for free NOW</span></div>
797
  <div class="gmw-promo-button"><a href="#">Start</a></div>
798
  </div>';
893
  <span style="display: none;" class="error email">Please double check your email address.</span>
894
  </p>';
895
  $out .= '<p class="center">
896
+ <a id="gmw_start_trial" href="#" class="button button-primary">Start my 14 days free trial</a>
897
  <p class="center">Or <a href="#" class="gmw_goto_intro">go PRO now</a></p>
898
  </p>';
899
  $out .= '</div>'; // before_trial
965
  <th scope="row"><label for="api_key">' . __('Google Maps API Key', 'google-maps-widget') . '</label></th>
966
  <td><input name="' . GMW::$options . '[api_key]" type="text" id="api_key" value="' . esc_attr($options['api_key']) . '" class="regular-text" placeholder="Google Maps API key" oninput="setCustomValidity(\'\')" oninvalid="this.setCustomValidity(\'Please use Google Developers Console to generate an API key and enter it here. It is completely free.\')"> <a href="#" class="button button-secondary gmw-test-api-key">Test API key</a>
967
  <p class="description">New Google Maps usage policy dictates that everyone using the maps should register for a free API key.<br>
968
+ Detailed instruction on how to generate it are available in the <a href="http://www.gmapswidget.com/documentation/generate-google-maps-api-key/" target="_blank">documentation</a>.<br>If you already have a key make sure the following APIs are enabled: Google Maps JavaScript API, Google Static Maps API, Google Maps Embed API &amp; Google Maps Geocoding API.</p></td>
969
+
 
970
  </tr>';
971
  echo '</table>';
972
  echo get_submit_button(__('Save Settings', 'google-maps-widget'));
1324
  $options['last_tracking'] = false;
1325
  GMW::set_options($options);
1326
  }
1327
+
1328
+ self::reset_pointers();
1329
  } // activate
1330
 
1331
 
1336
  if (isset($options['allow_tracking']) && $options['allow_tracking'] === true) {
1337
  GMW_tracking::clear_cron();
1338
  }
1339
+
1340
+ delete_transient('gmw_pointers');
1341
  } // deactivate
1342
 
1343
 
1347
  if (false) {
1348
  delete_option(GMW::$options);
1349
  }
1350
+
1351
+ delete_transient('gmw_pointers');
1352
  } // uninstall
1353
  } // class GMW
1354
 
1361
  register_uninstall_hook(__FILE__, array('GMW', 'uninstall'));
1362
  add_action('init', array('GMW', 'init'));
1363
  add_action('plugins_loaded', array('GMW', 'plugins_loaded'));
1364
+ add_action('widgets_init', array('GMW', 'widgets_init'));
js/gmw-admin-pointers.js ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Google Maps Widget
3
+ * (c) Web factory Ltd, 2012 - 2016
4
+ */
5
+
6
+
7
+ jQuery(document).ready(function($){
8
+ if (typeof gmw_pointers == 'undefined') {
9
+ return;
10
+ }
11
+
12
+ $.each(gmw_pointers, function(index, pointer) {
13
+ if (index.charAt(0) == '_') {
14
+ return true;
15
+ }
16
+ $(pointer.target).pointer({
17
+ content: '<h3>Google Maps Widget</h3><p>' + pointer.content + '</p>',
18
+ position: {
19
+ edge: pointer.edge,
20
+ align: pointer.align
21
+ },
22
+ width: 320,
23
+ close: function() {
24
+ $.post(ajaxurl, {
25
+ pointer: index,
26
+ _ajax_nonce: gmw_pointers._nonce_dismiss_pointer,
27
+ action: 'gmw_dismiss_pointer'
28
+ });
29
+ }
30
+ }).pointer('open');
31
+ });
32
+ });
readme.txt CHANGED
@@ -1,12 +1,11 @@
1
  === Google Maps Widget ===
2
  Contributors: WebFactory
3
  Tags: address, directions, gmaps, google maps shortcode, google maps, google maps directions, map, map shortcode, map widget, shortcode, streetview, widget
4
- Donate link: https://www.paypal.com/cgi-bin/webscr?business=gordan@webfactoryltd.com&cmd=_xclick&currency_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.6
9
- Stable tag: 3.40
10
 
11
  Tired of buggy and slow Google Maps plugins taking hours to setup? With GMW you'll have a perfect map with a thumbnail and lightbox in minutes!
12
 
@@ -26,25 +25,29 @@ Check out some examples on the <a href="http://www.gmapswidget.com/">Google Maps
26
 
27
  * map size - width & height
28
  * map type - road, satellite, terrain & hybrid
29
- * map color scheme - default, refreshed + 11 extra in PRO
30
  * zoom level
 
31
  * pin color
32
  * pin size
33
  * pin label
34
  * custom pin icon - any image can be used
35
  * 1500+ pins library in PRO
36
- * link type - lightbox, custom URL, replace thumbnail with interactive map (PRO), or disable link
 
 
37
  * text above map
38
  * text below map
39
 
40
  **Interactive map options**
41
 
42
- * map size - width & height (auto-adjusted on smaller screens) or fullscreen
43
  * map mode - place + in PRO: directions, search, view & street view
44
  * map type - road & satellite
45
  * zoom level
46
  * lightbox skin - light, dark + 20 extra in PRO
47
  * lightbox features - close on overlay click, close on esc key, close button & show map title
 
48
  * header text
49
  * footer text
50
 
@@ -52,6 +55,10 @@ Check out some examples on the <a href="http://www.gmapswidget.com/">Google Maps
52
 
53
  * by using the _[gmw id="#"]_ shortcode you can display the map in any page, post, or custom post type (PRO feature)
54
 
 
 
 
 
55
 
56
  > > **PRO** version offers more than 50 extra features and options including multiple pins support, pins library, skins, export, import and widget cloning features, Google Analytics integration and premium, USA based support. Install the plugin and try the PRO features 7 days for free! Features are activated instantly. Or read more about it on the <a href="http://www.gmapswidget.com/">official plugin site</a>.
57
 
@@ -92,14 +99,14 @@ Check out some examples on the <a href="http://www.gmapswidget.com/">Google Maps
92
 
93
  == Installation ==
94
 
95
- Follow the usual routine;
96
 
97
  1. Open WordPress admin, go to Plugins, click Add New
98
  2. Enter "Google Maps Widget" in search and hit Enter
99
  3. Plugin will show up as the first on the list, click "Install Now"
100
  4. Activate & go to Appearance - Widgets to configure
101
 
102
- Or if needed, upload manually;
103
 
104
  1. Download the plugin.
105
  2. Unzip it and upload to _wp-content/plugin/_
@@ -139,8 +146,15 @@ Read the <a href="http://wordpress.org/support/plugin/google-maps-widget">suppor
139
  3. Widget options - Thumbnail map
140
  4. Widget options - Interactive map
141
  5. Widget options - Shortcode
 
142
 
143
  == Changelog ==
 
 
 
 
 
 
144
  = 3.40 =
145
  * 2016/08/21
146
  * minor bug fixes
1
  === Google Maps Widget ===
2
  Contributors: WebFactory
3
  Tags: address, directions, gmaps, google maps shortcode, google maps, google maps directions, map, map shortcode, map widget, shortcode, streetview, 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: 4.6
8
+ Stable tag: 3.45
9
 
10
  Tired of buggy and slow Google Maps plugins taking hours to setup? With GMW you'll have a perfect map with a thumbnail and lightbox in minutes!
11
 
25
 
26
  * map size - width & height
27
  * map type - road, satellite, terrain & hybrid
28
+ * map color scheme - default, refreshed, ultra light + 11 extra in PRO
29
  * zoom level
30
+ * pin type
31
  * pin color
32
  * pin size
33
  * pin label
34
  * custom pin icon - any image can be used
35
  * 1500+ pins library in PRO
36
+ * link type - lightbox, custom URL, replace thumbnail with interactive map (PRO), immediately show interactive map (PRO) or disable link
37
+ * image format
38
+ * map language
39
  * text above map
40
  * text below map
41
 
42
  **Interactive map options**
43
 
44
+ * lightbox size - width & height (auto-adjusted on smaller screens) or fullscreen
45
  * map mode - place + in PRO: directions, search, view & street view
46
  * map type - road & satellite
47
  * zoom level
48
  * lightbox skin - light, dark + 20 extra in PRO
49
  * lightbox features - close on overlay click, close on esc key, close button & show map title
50
+ * map language
51
  * header text
52
  * footer text
53
 
55
 
56
  * by using the _[gmw id="#"]_ shortcode you can display the map in any page, post, or custom post type (PRO feature)
57
 
58
+ **Multiple Pins**
59
+
60
+ * you can add unlimited pins with custom markers and descriptions to thumbnail and interactive map (PRO feature)
61
+
62
 
63
  > > **PRO** version offers more than 50 extra features and options including multiple pins support, pins library, skins, export, import and widget cloning features, Google Analytics integration and premium, USA based support. Install the plugin and try the PRO features 7 days for free! Features are activated instantly. Or read more about it on the <a href="http://www.gmapswidget.com/">official plugin site</a>.
64
 
99
 
100
  == Installation ==
101
 
102
+ **Follow the usual routine**
103
 
104
  1. Open WordPress admin, go to Plugins, click Add New
105
  2. Enter "Google Maps Widget" in search and hit Enter
106
  3. Plugin will show up as the first on the list, click "Install Now"
107
  4. Activate & go to Appearance - Widgets to configure
108
 
109
+ **Or if needed, upload manually**
110
 
111
  1. Download the plugin.
112
  2. Unzip it and upload to _wp-content/plugin/_
146
  3. Widget options - Thumbnail map
147
  4. Widget options - Interactive map
148
  5. Widget options - Shortcode
149
+ 6. Thumbnail map - light color scheme
150
 
151
  == Changelog ==
152
+ = 3.45 =
153
+ * 2016/10/24
154
+ * new prices, trial 14 days
155
+ * welcome pointer added
156
+ * minor bug fixes
157
+
158
  = 3.40 =
159
  * 2016/08/21
160
  * minor bug fixes