PluginProbe
Maps Widget for Google Maps / 2.50
Maps Widget for Google Maps v2.50
1.86 1.90 1.92 1.93 1.95 2.0 2.01 2.05 2.06 2.10 2.15 2.20 2.25 2.30 2.35 2.40 2.45 2.50 2.51 2.60 2.65 2.66 2.70 2.75 2.80 All 129 releases
← All changes | google-maps-widget.php +14 -23 2.752.50 View file →
@@ -3,9 +3,9 @@
3 3 Plugin Name: Google Maps Widget
4 4 Plugin URI: http://www.googlemapswidget.com/
5 5 Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox. Includes shortcode support and numerous options.
6 6 Author: Web factory Ltd
7 -Version: 2.75
7 +Version: 2.50
8 8 Author URI: http://www.webfactoryltd.com/
9 9 Text Domain: google-maps-widget
10 10 Domain Path: lang
11 11
@@ -39,9 +39,9 @@
39 39 require_once 'gmw-tracking.php';
40 40
41 41
42 42 class GMW {
43 - static $version = '2.75';
43 + static $version = 2.50;
44 44
45 45 // hook everything up
46 46 static function init() {
47 47 GMW_tracking::init();
@@ -237,24 +237,21 @@
237 237 static function add_notices() {
238 238 $options = get_option(GMW_OPTIONS, array());
239 239 $notice = false;
240 240
241 - if (empty($options['dismiss_notice_upgrade']) && !self::is_activated()) {
241 + if ((!isset($options['dismiss_notice_upgrade']) || $options['dismiss_notice_upgrade'] == false) &&
242 + !self::is_activated() &&
243 + (GMW_tracking::count_active_widgets() > 0 || (current_time('timestamp') - $options['first_install']) > (DAY_IN_SECONDS * 3))) {
242 244 add_action('admin_notices', array(__CLASS__, 'notice_activate_extra_features'));
243 245 $notice = true;
244 246 } // show upgrade notice
245 247
246 - if (!$notice && empty($options['dismiss_notice_rate']) &&
248 + if (!$notice &&
249 + (!isset($options['dismiss_notice_rate']) || $options['dismiss_notice_rate'] == false) &&
247 250 GMW_tracking::count_active_widgets() > 0 &&
248 - (current_time('timestamp') - $options['first_install']) > (DAY_IN_SECONDS * 3)) {
251 + (current_time('timestamp') - $options['first_install']) > (DAY_IN_SECONDS * 20)) {
249 252 add_action('admin_notices', array(__CLASS__, 'notice_rate_plugin'));
250 - $notice = true;
251 253 } // show rate notice
252 -
253 - if (!$notice && !isset($options['allow_tracking']) && ((current_time('timestamp') - $options['first_install']) > (DAY_IN_SECONDS * 5))) {
254 - add_action('admin_notices', array('GMW_tracking', 'tracking_notice'));
255 - $notice = true;
256 - } // show tracking notice
257 254 } // add_notices
258 255
259 256
260 257 // display message to get extra features for GMW
@@ -363,9 +360,9 @@
363 360 $out .= '<div id="gmw_dialog_subscribe"><div class="content"><h3 class="center">' . __('Fill out the form and<br>get extra features &amp; options <b>for FREE</b> instantly!', 'google-maps-widget') . '</h3>';
364 361 $out .= '<p class="input_row"><input value="' . $name . '" type="text" id="gmw_name" name="gmw_name" placeholder="Your name"><span class="error name" style="display: none;">Please enter your name.</span></p>';
365 362 $out .= '<p class="input_row"><input value="' . $current_user->user_email . '" type="text" name="gmw_email" id="gmw_email" placeholder="Your email address"><span style="display: none;" class="error email">Please double check your email address.</span></p>';
366 363 $out .= '<p class="center"><a id="gmw_subscribe" href="#" class="button button-primary big-button">Activate extra features</a><br><a href="#" class="" id="gmw_already_subscribed">I already have an activation code</a></p></div>';
367 - $out .= '<div class="footer"><p><b>Still not sure?</b></p><ul><li>We\'ll never share your email address</li><li>We won\'t spam you or overwhelm with emails</li><li>Be the first to get notified about new features</li><li>You\'ll get discounts for our premium WP plugins</li></ul></div>';
364 + $out .= '<div class="footer"><p><b>Why subscribe?</b></p><ul><li>We\'ll never share your email address</li><li>We won\'t spam you or overwhelm with emails</li><li>Be the first to get notified about new features</li><li>You\'ll get all future upgrades for free as well</li><li>You\'ll get discounts for our premium WP plugins</li></ul></div>';
368 365 $out .= '</div>'; // dialog subscribe
369 366 $out .= '<div id="gmw_dialog_activate"><div class="content"><h3 class="center">' . __('Enter your code and activate extra features', 'google-maps-widget') . '</h3>';
370 367 $out .= '<p class="input_row"><input type="text" id="gmw_code" name="gmw_code" placeholder="Your activation code"><span style="display: none;" class="error gmw_code">Please double check the activation code.</span></p><p class="center"><a href="#" class="button button-primary big-button" id="gmw_activate">Activate extra features</a></p></div>';
371 368 $out .= '<div class="footer"><p><b>FAQ</b></p><ul><li>Already subscribed? Enter your activation code above.</li><li>Didn\'t receive the email? Check your SPAM folder.</li><li>Still not getting the email? Try a different email address.</li><li>Code is valid for an unlimited number of plugin installations.</li></ul></div>';
@@ -488,33 +485,27 @@
488 485
489 486 // shortcode support for any GMW instance
490 487 static function do_shortcode($atts, $content = null) {
491 488 if (!self::is_activated()) {
492 - return '';
489 + return;
493 490 }
494 491
495 492 global $wp_widget_factory;
496 - $out = '';
497 493 $atts = shortcode_atts(array('id' => 0), $atts);
498 494 $id = (int) $atts['id'];
499 495 $widgets = get_option('widget_googlemapswidget');
500 496
501 - if (!$id || empty($widgets[$id])) {
502 - $out .= '<span class="gmw-error">Google Maps Widget shortcode error - please double-check the widget ID.</span>';
497 + if (!$id || !isset($widgets[$id]) || empty($widgets[$id])) {
498 + echo '<span class="gmw-error">Google Maps Widget shortcode error - please double-check the widget ID.</span>';
503 499 } else {
504 500 $widget_args = $widgets[$id];
505 501 $widget_instance['widget_id'] = 'googlemapswidget-' . $id;
506 502 $widget_instance['widget_name'] = 'Google Maps Widget';
507 503
508 - $out .= '<span class="gmw-shortcode-widget">';
509 - ob_start();
504 + echo '<span class="gmw-shortcode-widget">';
510 505 the_widget('GoogleMapsWidget', $widget_args, $widget_instance);
511 - $out .= ob_get_contents();
512 - ob_end_clean();
513 - $out .= '</span>';
506 + echo '</span>';
514 507 }
515 -
516 - return $out;
517 508 } // do_shortcode
518 509
519 510
520 511 // activate doesn't get fired on upgrades so we have to compensate