Version Description
- 2014/02/05
- added optional plugin usage tracking (detailed info)
Download this release
Release Info
Developer | WebFactory |
Plugin | Google Maps Widget – Ultimate Google Maps Plugin |
Version | 1.35 |
Comparing to | |
See all releases |
Code changes from version 1.31 to 1.35
- gmw-tracking.php +169 -0
- gmw-widget.php +4 -1
- google-maps-widget.php +57 -27
- readme.txt +7 -3
gmw-tracking.php
ADDED
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Google Maps Widget
|
4 |
+
* Plugin usage tracking
|
5 |
+
* (c) Web factory Ltd, 2012 - 2014
|
6 |
+
*/
|
7 |
+
|
8 |
+
|
9 |
+
// include only file
|
10 |
+
if (!defined('ABSPATH')) {
|
11 |
+
die();
|
12 |
+
}
|
13 |
+
|
14 |
+
|
15 |
+
class GMW_tracking {
|
16 |
+
public static function init() {
|
17 |
+
$options = get_option(GMW_OPTIONS);
|
18 |
+
|
19 |
+
self::check_opt_in_out();
|
20 |
+
|
21 |
+
// ask user if he wants to allow tracking
|
22 |
+
if (is_admin() && !isset($options['allow_tracking'])) {
|
23 |
+
add_action('admin_notices', array(__CLASS__, 'tracking_notice'));
|
24 |
+
}
|
25 |
+
|
26 |
+
add_action(GMW_CRON, array(__CLASS__, 'send_data'));
|
27 |
+
// todo - write this properly, so it doesn't run each time, $force ...
|
28 |
+
GMW_tracking::setup_cron();
|
29 |
+
} // init
|
30 |
+
|
31 |
+
|
32 |
+
// register additional cron interval
|
33 |
+
public static function register_cron_intervals($schedules) {
|
34 |
+
$schedules['gmw_weekly'] = array(
|
35 |
+
'interval' => DAY_IN_SECONDS * 7,
|
36 |
+
'display' => 'Once a Week');
|
37 |
+
|
38 |
+
return $schedules;
|
39 |
+
} // cron_intervals
|
40 |
+
|
41 |
+
|
42 |
+
// clear cron scheadule
|
43 |
+
public static function clear_cron() {
|
44 |
+
wp_clear_scheduled_hook(GMW_CRON);
|
45 |
+
} // clear_cron
|
46 |
+
|
47 |
+
|
48 |
+
// setup cron job when user allows tracking
|
49 |
+
public static function setup_cron() {
|
50 |
+
$options = get_option(GMW_OPTIONS);
|
51 |
+
|
52 |
+
if (isset($options['allow_tracking']) && $options['allow_tracking'] === true) {
|
53 |
+
if (!wp_next_scheduled(GMW_CRON)) {
|
54 |
+
wp_schedule_event(time() + 300, 'gmw_weekly', GMW_CRON);
|
55 |
+
}
|
56 |
+
} else {
|
57 |
+
self::clear_cron();
|
58 |
+
}
|
59 |
+
} // setup_cron
|
60 |
+
|
61 |
+
|
62 |
+
// save user's choice for (not) allowing tracking
|
63 |
+
public static function check_opt_in_out() {
|
64 |
+
$options = get_option(GMW_OPTIONS);
|
65 |
+
|
66 |
+
if (isset($_GET['gmw_tracking']) && $_GET['gmw_tracking'] == 'opt_in') {
|
67 |
+
$options['allow_tracking'] = true;
|
68 |
+
update_option(GMW_OPTIONS, $options);
|
69 |
+
self::send_data(true);
|
70 |
+
wp_redirect(remove_query_arg('gmw_tracking'));
|
71 |
+
die();
|
72 |
+
} else if (isset($_GET['gmw_tracking']) && $_GET['gmw_tracking'] == 'opt_out') {
|
73 |
+
$options['allow_tracking'] = false;
|
74 |
+
update_option(GMW_OPTIONS, $options);
|
75 |
+
wp_redirect(remove_query_arg('gmw_tracking'));
|
76 |
+
die();
|
77 |
+
}
|
78 |
+
} // check_opt_in_out
|
79 |
+
|
80 |
+
|
81 |
+
// display tracking notice
|
82 |
+
public static function tracking_notice() {
|
83 |
+
$optin_url = add_query_arg('gmw_tracking', 'opt_in');
|
84 |
+
$optout_url = add_query_arg('gmw_tracking', 'opt_out');
|
85 |
+
|
86 |
+
echo '<div class="updated"><p>';
|
87 |
+
echo __( 'Please help us improve <strong>Google Maps Widget</strong> by allowing us to track anonymous usage data. Absolutely <strong>no sensitive data is tracked</strong> (<a href="http://www.googlemapswidget.com/plugin-tracking-info/" target="_blank">complete disclosure & details of our tracking policy</a>).', 'google-maps-widget');
|
88 |
+
echo ' <a href="' . esc_url($optin_url) . '" style="vertical-align: baseline;" class="button-secondary">' . __('Allow', 'google-maps-widget') . '</a>';
|
89 |
+
echo ' <a href="' . esc_url($optout_url) . '" class="">' . __('Do not allow tracking', 'google-maps-widget') . '</a>';
|
90 |
+
echo '</p></div>';
|
91 |
+
} // tracking_notice
|
92 |
+
|
93 |
+
|
94 |
+
// send usage data once a week to our server
|
95 |
+
public static function send_data($force = false) {
|
96 |
+
$options = get_option(GMW_OPTIONS);
|
97 |
+
|
98 |
+
if ($force == false && (!isset($options['allow_tracking']) || $options['allow_tracking'] !== true)) {
|
99 |
+
return;
|
100 |
+
}
|
101 |
+
if ($force == false && ($options['last_tracking'] && $options['last_tracking'] > strtotime( '-6 days'))) {
|
102 |
+
return;
|
103 |
+
}
|
104 |
+
|
105 |
+
$data = self::prepare_data();
|
106 |
+
$request = wp_remote_post('http://www.googlemapswidget.com/tracking.php', array(
|
107 |
+
'method' => 'POST',
|
108 |
+
'timeout' => 10,
|
109 |
+
'redirection' => 3,
|
110 |
+
'httpversion' => '1.0',
|
111 |
+
'body' => $data,
|
112 |
+
'user-agent' => 'GMW/' . GMW_VER));
|
113 |
+
|
114 |
+
$options['last_tracking'] = current_time('timestamp');
|
115 |
+
update_option(GMW_OPTIONS, $options);
|
116 |
+
} // send_data
|
117 |
+
|
118 |
+
|
119 |
+
// get and prepare data that will be sent out
|
120 |
+
public static function prepare_data() {
|
121 |
+
$options = get_option(GMW_OPTIONS);
|
122 |
+
$data = array();
|
123 |
+
|
124 |
+
$data['url'] = home_url();
|
125 |
+
$data['wp_version'] = get_bloginfo('version');
|
126 |
+
$data['gmw_version'] = GMW_VER;
|
127 |
+
$data['gmw_first_version'] = $options['first_version'];
|
128 |
+
$data['gmw_first_install'] = $options['first_install'];
|
129 |
+
|
130 |
+
$data['gmw_count'] = 0;
|
131 |
+
$sidebars = get_option('sidebars_widgets', array());
|
132 |
+
foreach ($sidebars as $sidebar_name => $widgets) {
|
133 |
+
if (strpos($sidebar_name, 'inactive') !== false || strpos($sidebar_name, 'orphaned') !== false) {
|
134 |
+
continue;
|
135 |
+
}
|
136 |
+
if (is_array($widgets)) {
|
137 |
+
foreach ($widgets as $widget_name) {
|
138 |
+
if (strpos($widget_name, 'googlemapswidget') !== false) {
|
139 |
+
$data['gmw_count']++;
|
140 |
+
}
|
141 |
+
}
|
142 |
+
}
|
143 |
+
} // foreach sidebar
|
144 |
+
|
145 |
+
if (get_bloginfo('version') < '3.4') {
|
146 |
+
$theme = get_theme_data(get_stylesheet_directory() . '/style.css');
|
147 |
+
$data['theme_name'] = $theme['Name'];
|
148 |
+
$data['theme_version'] = $theme['Version'];
|
149 |
+
} else {
|
150 |
+
$theme = wp_get_theme();
|
151 |
+
$data['theme_name'] = $theme->Name;
|
152 |
+
$data['theme_version'] = $theme->Version;
|
153 |
+
}
|
154 |
+
|
155 |
+
// get current plugin information
|
156 |
+
if (!function_exists('get_plugins')) {
|
157 |
+
include ABSPATH . '/wp-admin/includes/plugin.php';
|
158 |
+
}
|
159 |
+
|
160 |
+
$plugins = get_plugins();
|
161 |
+
$active_plugins = get_option('active_plugins', array());
|
162 |
+
|
163 |
+
foreach ($active_plugins as $plugin) {
|
164 |
+
$data['plugins'][$plugin] = @$plugins[$plugin];
|
165 |
+
}
|
166 |
+
|
167 |
+
return $data;
|
168 |
+
} // prepare_data
|
169 |
+
} // class GMW_tracking
|
gmw-widget.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
* Google Maps Widget
|
4 |
* Widget definition, admin GUI and front-end functions
|
5 |
-
* (c) Web factory Ltd, 2012 -
|
6 |
*/
|
7 |
|
8 |
|
@@ -45,6 +45,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
45 |
'lightbox_header' => '',
|
46 |
'lightbox_footer' => ''));
|
47 |
|
|
|
48 |
$title = $instance['title'];
|
49 |
$address = $instance['address'];
|
50 |
$thumb_pin_color = $instance['thumb_pin_color'];
|
@@ -283,6 +284,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
283 |
|
284 |
if ($instance['thumb_header']) {
|
285 |
$tmp .= wpautop($instance['thumb_header']);
|
|
|
286 |
}
|
287 |
$tmp .= '<p>';
|
288 |
if ($instance['thumb_link_type'] == 'lightbox') {
|
@@ -301,6 +303,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
301 |
$tmp .= '</p>';
|
302 |
if ($instance['thumb_footer']) {
|
303 |
$tmp .= wpautop($instance['thumb_footer']);
|
|
|
304 |
}
|
305 |
$out .= apply_filters('google_maps_widget_content', $tmp);
|
306 |
|
2 |
/*
|
3 |
* Google Maps Widget
|
4 |
* Widget definition, admin GUI and front-end functions
|
5 |
+
* (c) Web factory Ltd, 2012 - 2014
|
6 |
*/
|
7 |
|
8 |
|
45 |
'lightbox_header' => '',
|
46 |
'lightbox_footer' => ''));
|
47 |
|
48 |
+
// todo - use extract() to make code nicer
|
49 |
$title = $instance['title'];
|
50 |
$address = $instance['address'];
|
51 |
$thumb_pin_color = $instance['thumb_pin_color'];
|
284 |
|
285 |
if ($instance['thumb_header']) {
|
286 |
$tmp .= wpautop($instance['thumb_header']);
|
287 |
+
// todo, test - do_shortcode
|
288 |
}
|
289 |
$tmp .= '<p>';
|
290 |
if ($instance['thumb_link_type'] == 'lightbox') {
|
303 |
$tmp .= '</p>';
|
304 |
if ($instance['thumb_footer']) {
|
305 |
$tmp .= wpautop($instance['thumb_footer']);
|
306 |
+
// todo, test - do_shortcode
|
307 |
}
|
308 |
$out .= apply_filters('google_maps_widget_content', $tmp);
|
309 |
|
google-maps-widget.php
CHANGED
@@ -4,10 +4,12 @@ Plugin Name: Google Maps Widget
|
|
4 |
Plugin URI: http://www.googlemapswidget.com/
|
5 |
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
Author: Web factory Ltd
|
7 |
-
Version: 1.
|
8 |
Author URI: http://www.webfactoryltd.com/
|
|
|
|
|
9 |
|
10 |
-
Copyright
|
11 |
|
12 |
This program is free software; you can redistribute it and/or modify
|
13 |
it under the terms of the GNU General Public License, version 2, as
|
@@ -24,40 +26,47 @@ Author URI: http://www.webfactoryltd.com/
|
|
24 |
*/
|
25 |
|
26 |
|
27 |
-
if (!
|
28 |
-
die(
|
29 |
}
|
30 |
|
31 |
|
32 |
-
define('GMW_VER', '1.
|
|
|
|
|
|
|
33 |
require_once 'gmw-widget.php';
|
|
|
34 |
|
35 |
|
36 |
class GMW {
|
37 |
// hook everything up
|
38 |
static function init() {
|
39 |
-
|
40 |
-
// check if minimal required WP version is used
|
41 |
-
self::check_wp_version(3.3);
|
42 |
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
55 |
} // init
|
56 |
|
57 |
|
58 |
-
//
|
59 |
static function plugins_loaded() {
|
60 |
load_plugin_textdomain('google-maps-widget', false, basename(dirname(__FILE__)) . '/lang');
|
|
|
61 |
} // plugins_loaded
|
62 |
|
63 |
|
@@ -67,7 +76,7 @@ class GMW {
|
|
67 |
} // widgets_init
|
68 |
|
69 |
|
70 |
-
// add
|
71 |
static function plugin_action_links($links) {
|
72 |
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="' . __('Configure Google Maps Widget', 'google-maps-widget') . '">' . __('Widgets', 'google-maps-widget') . '</a>';
|
73 |
array_unshift($links, $settings_link);
|
@@ -78,12 +87,16 @@ class GMW {
|
|
78 |
|
79 |
// add links to plugin's description in plugins table
|
80 |
static function plugin_meta_links($links, $file) {
|
81 |
-
|
|
|
82 |
$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>';
|
|
|
|
|
83 |
|
84 |
if ($file == plugin_basename(__FILE__)) {
|
85 |
-
//$links[] = $documentation_link;
|
86 |
$links[] = $support_link;
|
|
|
|
|
87 |
}
|
88 |
|
89 |
return $links;
|
@@ -208,6 +221,7 @@ class GMW {
|
|
208 |
if ($force_refresh || ($coordinates = get_transient($address_hash)) === false) {
|
209 |
$url = 'http://maps.googleapis.com/maps/api/geocode/xml?address=' . urlencode($address) . '&sensor=false';
|
210 |
|
|
|
211 |
$ch = curl_init();
|
212 |
curl_setopt($ch, CURLOPT_URL, $url);
|
213 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
@@ -241,15 +255,30 @@ class GMW {
|
|
241 |
return $data;
|
242 |
} // get_coordinates
|
243 |
|
244 |
-
|
245 |
-
//
|
|
|
246 |
static function activate() {
|
247 |
-
$options = get_option(
|
248 |
|
249 |
if (!isset($options['first_version']) || !isset($options['first_install'])) {
|
250 |
$options['first_version'] = GMW_VER;
|
251 |
$options['first_install'] = current_time('timestamp');
|
252 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
}
|
254 |
} // activate
|
255 |
} // class GMW
|
@@ -257,6 +286,7 @@ class GMW {
|
|
257 |
|
258 |
// hook everything up
|
259 |
register_activation_hook(__FILE__, array('GMW', 'activate'));
|
|
|
260 |
add_action('init', array('GMW', 'init'));
|
261 |
add_action('plugins_loaded', array('GMW', 'plugins_loaded'));
|
262 |
add_action('widgets_init', array('GMW', 'widgets_init'));
|
4 |
Plugin URI: http://www.googlemapswidget.com/
|
5 |
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
Author: Web factory Ltd
|
7 |
+
Version: 1.35
|
8 |
Author URI: http://www.webfactoryltd.com/
|
9 |
+
Text Domain: google-maps-widget
|
10 |
+
Domain Path: lang
|
11 |
|
12 |
+
Copyright 2012 - 2014 Web factory Ltd (email : info@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
|
26 |
*/
|
27 |
|
28 |
|
29 |
+
if (!defined('ABSPATH')) {
|
30 |
+
die();
|
31 |
}
|
32 |
|
33 |
|
34 |
+
define('GMW_VER', '1.35');
|
35 |
+
define('GMW_OPTIONS', 'gmw_options');
|
36 |
+
define('GMW_CRON', 'gmw_cron');
|
37 |
+
|
38 |
require_once 'gmw-widget.php';
|
39 |
+
require_once 'gmw-tracking.php';
|
40 |
|
41 |
|
42 |
class GMW {
|
43 |
// hook everything up
|
44 |
static function init() {
|
45 |
+
GMW_tracking::init();
|
|
|
|
|
46 |
|
47 |
+
if (is_admin()) {
|
48 |
+
// check if minimal required WP version is used
|
49 |
+
self::check_wp_version(3.3);
|
|
|
50 |
|
51 |
+
// aditional links in plugin description
|
52 |
+
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
53 |
+
array(__CLASS__, 'plugin_action_links'));
|
54 |
+
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
55 |
+
|
56 |
+
// enqueue admin scripts
|
57 |
+
add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
|
58 |
+
} else {
|
59 |
+
// enqueue frontend scripts
|
60 |
+
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
61 |
+
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
62 |
+
}
|
63 |
} // init
|
64 |
|
65 |
|
66 |
+
// some things have to be loaded earlier
|
67 |
static function plugins_loaded() {
|
68 |
load_plugin_textdomain('google-maps-widget', false, basename(dirname(__FILE__)) . '/lang');
|
69 |
+
add_filter('cron_schedules', array('GMW_tracking', 'register_cron_intervals'));
|
70 |
} // plugins_loaded
|
71 |
|
72 |
|
76 |
} // widgets_init
|
77 |
|
78 |
|
79 |
+
// add widgets link to plugins page
|
80 |
static function plugin_action_links($links) {
|
81 |
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="' . __('Configure Google Maps Widget', 'google-maps-widget') . '">' . __('Widgets', 'google-maps-widget') . '</a>';
|
82 |
array_unshift($links, $settings_link);
|
87 |
|
88 |
// add links to plugin's description in plugins table
|
89 |
static function plugin_meta_links($links, $file) {
|
90 |
+
// todo - write proper docs
|
91 |
+
//$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="' . __('View Google Maps Widget documentation', 'google-maps-widget') . '">'. __('Documentation', 'google-maps-widget') . '</a>';
|
92 |
$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>';
|
93 |
+
$review_link = '<a target="_blank" href="http://wordpress.org/support/view/plugin-reviews/google-maps-widget" title="' . __('If you like it, please review the plugin', 'google-maps-widget') . '">' . __('Review the plugin', 'google-maps-widget') . '</a>';
|
94 |
+
$donate_link = '<a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=gordan%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest" title="' . __('If you feel we deserve it, buy us coffee', 'google-maps-widget') . '">' . __('Donate', 'google-maps-widget') . '</a>';
|
95 |
|
96 |
if ($file == plugin_basename(__FILE__)) {
|
|
|
97 |
$links[] = $support_link;
|
98 |
+
$links[] = $review_link;
|
99 |
+
$links[] = $donate_link;
|
100 |
}
|
101 |
|
102 |
return $links;
|
221 |
if ($force_refresh || ($coordinates = get_transient($address_hash)) === false) {
|
222 |
$url = 'http://maps.googleapis.com/maps/api/geocode/xml?address=' . urlencode($address) . '&sensor=false';
|
223 |
|
224 |
+
// todo - rewrite using wp_remote_get()
|
225 |
$ch = curl_init();
|
226 |
curl_setopt($ch, CURLOPT_URL, $url);
|
227 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
255 |
return $data;
|
256 |
} // get_coordinates
|
257 |
|
258 |
+
|
259 |
+
// write down a few things on plugin activation
|
260 |
+
// NO DATA is sent anywhere unless user explicitly agrees to it!
|
261 |
static function activate() {
|
262 |
+
$options = get_option(GMW_OPTIONS);
|
263 |
|
264 |
if (!isset($options['first_version']) || !isset($options['first_install'])) {
|
265 |
$options['first_version'] = GMW_VER;
|
266 |
$options['first_install'] = current_time('timestamp');
|
267 |
+
$options['last_tracking'] = false;
|
268 |
+
update_option(GMW_OPTIONS, $options);
|
269 |
+
}
|
270 |
+
} // activate
|
271 |
+
|
272 |
+
|
273 |
+
// clean up on deactivation
|
274 |
+
static function deactivate() {
|
275 |
+
$options = get_option(GMW_OPTIONS);
|
276 |
+
|
277 |
+
if (isset($options['allow_tracking']) && $options['allow_tracking'] === false) {
|
278 |
+
unset($options['allow_tracking']);
|
279 |
+
update_option(GMW_OPTIONS, $options);
|
280 |
+
} elseif (isset($options['allow_tracking']) && $options['allow_tracking'] === true) {
|
281 |
+
GMW_tracking::clear_cron();
|
282 |
}
|
283 |
} // activate
|
284 |
} // class GMW
|
286 |
|
287 |
// hook everything up
|
288 |
register_activation_hook(__FILE__, array('GMW', 'activate'));
|
289 |
+
register_deactivation_hook(__FILE__, array('GMW', 'deactivate'));
|
290 |
add_action('init', array('GMW', 'init'));
|
291 |
add_action('plugins_loaded', array('GMW', 'plugins_loaded'));
|
292 |
add_action('widgets_init', array('GMW', 'widgets_init'));
|
readme.txt
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
=== Google Maps Widget ===
|
2 |
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=
|
4 |
Tags: google maps, maps, gmaps, widget, lightbox, map, google map, fancybox, fancybox2, multilingual, sidebar, chinese
|
5 |
License: GPLv2 or later
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
Requires at least: 3.3
|
8 |
Tested up to: 3.8.1
|
9 |
-
Stable tag: 1.
|
10 |
|
11 |
Displays a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
12 |
|
@@ -46,7 +46,7 @@ http://www.youtube.com/watch?v=y1siX9ha7Pw&hd=1
|
|
46 |
|
47 |
> If you need a Google Maps shortcode plugin you might be interested in purchasing our premium <a title="5sec Google Maps" href="http://5sec-gmap.webfactoryltd.com/">5sec Google Maps</a> plugin.
|
48 |
|
49 |
-
The plugin was 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.
|
50 |
|
51 |
**Translators (thank you!)**
|
52 |
|
@@ -99,6 +99,10 @@ If you can figure it out open a thread in the support forums.
|
|
99 |
4. Widget options - lightbox map
|
100 |
|
101 |
== Changelog ==
|
|
|
|
|
|
|
|
|
102 |
= 1.31 =
|
103 |
* 2014/02/03
|
104 |
* WP v3.8.1 compatibility check
|
1 |
=== Google Maps Widget ===
|
2 |
Contributors: WebFactory
|
3 |
+
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=gordan%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
Tags: google maps, maps, gmaps, widget, lightbox, map, google map, fancybox, fancybox2, multilingual, sidebar, chinese
|
5 |
License: GPLv2 or later
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
Requires at least: 3.3
|
8 |
Tested up to: 3.8.1
|
9 |
+
Stable tag: 1.35
|
10 |
|
11 |
Displays a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
12 |
|
46 |
|
47 |
> If you need a Google Maps shortcode plugin you might be interested in purchasing our premium <a title="5sec Google Maps" href="http://5sec-gmap.webfactoryltd.com/">5sec Google Maps</a> plugin.
|
48 |
|
49 |
+
The plugin was 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 and made it on the <a href="http://tidyrepo.com/google-maps-widget/">Tidy Repo</a> list.
|
50 |
|
51 |
**Translators (thank you!)**
|
52 |
|
99 |
4. Widget options - lightbox map
|
100 |
|
101 |
== Changelog ==
|
102 |
+
= 1.35 =
|
103 |
+
* 2014/02/05
|
104 |
+
* added optional plugin usage tracking (<a href="http://www.googlemapswidget.com/plugin-tracking-info/">detailed info</a>)
|
105 |
+
|
106 |
= 1.31 =
|
107 |
* 2014/02/03
|
108 |
* WP v3.8.1 compatibility check
|