Version Description
- Fixed bug introduced with 4.2.3 that wouldn't allow saving settings.
- Now only flushing enabled W3TC caches.
Download this release
Release Info
Developer | joostdevalk |
Plugin | Google Analytics for WordPress by MonsterInsights |
Version | 4.2.4 |
Comparing to | |
See all releases |
Code changes from version 4.2.3 to 4.2.4
- googleanalytics.php +19 -15
- readme.txt +6 -1
- yst_plugin_tools.php +1 -1
googleanalytics.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google Analytics for WordPress
|
|
4 |
Plugin URI: http://yoast.com/wordpress/google-analytics/#utm_source=wordpress&utm_medium=plugin&utm_campaign=wpgaplugin&utm_content=v420
|
5 |
Description: This plugin makes it simple to add Google Analytics to your WordPress blog, adding lots of features, eg. custom variables and automatic clickout and download tracking.
|
6 |
Author: Joost de Valk
|
7 |
-
Version: 4.2.
|
8 |
Requires at least: 3.0
|
9 |
Author URI: http://yoast.com/
|
10 |
License: GPL
|
@@ -209,10 +209,11 @@ if ( is_admin() && ( !defined('DOING_AJAX') || !DOING_AJAX ) && !class_exists( '
|
|
209 |
if ( isset($_REQUEST['reset']) && $_REQUEST['reset'] == "true" && isset($_REQUEST['plugin']) && $_REQUEST['plugin'] == 'google-analytics-for-wordpress') {
|
210 |
$options = $this->set_defaults();
|
211 |
$options['msg'] = "<div class=\"updated\"><p>".__('Google Analytics settings reset.')."</p></div>\n";
|
212 |
-
} elseif ( isset($_POST['submit']) && isset($_POST['plugin']) && $_POST['plugin'] == 'google-analytics-for-wordpress') {
|
|
|
213 |
if (!current_user_can('manage_options')) die(__('You cannot edit the Google Analytics for WordPress options.'));
|
214 |
check_admin_referer('analyticspp-config');
|
215 |
-
|
216 |
foreach (array('uastring', 'dlextensions', 'domainorurl','position','domain', 'customcode', 'ga_token', 'extraseurl', 'gajsurl', 'gfsubmiteventpv', 'trackprefix', 'ignore_userlevel', 'internallink', 'internallinklabel', 'primarycrossdomain', 'othercrossdomains') as $option_name) {
|
217 |
if (isset($_POST[$option_name]))
|
218 |
$options[$option_name] = $_POST[$option_name];
|
@@ -221,7 +222,7 @@ if ( is_admin() && ( !defined('DOING_AJAX') || !DOING_AJAX ) && !class_exists( '
|
|
221 |
}
|
222 |
|
223 |
foreach (array('extrase', 'trackoutbound', 'admintracking', 'trackadsense', 'allowanchor', 'allowlinker', 'allowhash', 'rsslinktagging', 'advancedsettings', 'trackregistration', 'theme_updated', 'cv_loggedin', 'cv_authorname', 'cv_category', 'cv_all_categories', 'cv_tags', 'cv_year', 'cv_post_type', 'outboundpageview', 'downloadspageview', 'trackcrossdomain','gajslocalhosting', 'manual_uastring', 'taggfsubmit', 'wpec_tracking', 'shopp_tracking', 'anonymizeip', 'trackcommentform', 'debug','firebuglite') as $option_name) {
|
224 |
-
if (isset($_POST[$option_name]) && $_POST[$option_name]
|
225 |
$options[$option_name] = true;
|
226 |
else
|
227 |
$options[$option_name] = false;
|
@@ -240,20 +241,23 @@ if ( is_admin() && ( !defined('DOING_AJAX') || !DOING_AJAX ) && !class_exists( '
|
|
240 |
$options['primarycrossdomain'] = $origin["domain"];
|
241 |
}
|
242 |
}
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
|
|
|
|
|
|
|
|
|
|
249 |
w3tc_objectcache_flush();
|
250 |
-
|
251 |
-
|
252 |
wp_cache_clear_cache();
|
253 |
-
$cache = ' and <strong>WP Super Cache cleared</strong>';
|
254 |
-
}
|
255 |
|
256 |
-
$options['msg'] = "<div id=\"updatemessage\" class=\"updated fade\"><p>Google Analytics <strong>settings updated</strong
|
257 |
$options['msg'] .= "<script type=\"text/javascript\">setTimeout(function(){jQuery('#updatemessage').hide('slow');}, 3000);</script>";
|
258 |
}
|
259 |
update_option($this->optionname, $options);
|
4 |
Plugin URI: http://yoast.com/wordpress/google-analytics/#utm_source=wordpress&utm_medium=plugin&utm_campaign=wpgaplugin&utm_content=v420
|
5 |
Description: This plugin makes it simple to add Google Analytics to your WordPress blog, adding lots of features, eg. custom variables and automatic clickout and download tracking.
|
6 |
Author: Joost de Valk
|
7 |
+
Version: 4.2.4
|
8 |
Requires at least: 3.0
|
9 |
Author URI: http://yoast.com/
|
10 |
License: GPL
|
209 |
if ( isset($_REQUEST['reset']) && $_REQUEST['reset'] == "true" && isset($_REQUEST['plugin']) && $_REQUEST['plugin'] == 'google-analytics-for-wordpress') {
|
210 |
$options = $this->set_defaults();
|
211 |
$options['msg'] = "<div class=\"updated\"><p>".__('Google Analytics settings reset.')."</p></div>\n";
|
212 |
+
} elseif ( isset($_POST['submit']) && isset($_POST['plugin']) && $_POST['plugin'] == 'google-analytics-for-wordpress') {
|
213 |
+
|
214 |
if (!current_user_can('manage_options')) die(__('You cannot edit the Google Analytics for WordPress options.'));
|
215 |
check_admin_referer('analyticspp-config');
|
216 |
+
|
217 |
foreach (array('uastring', 'dlextensions', 'domainorurl','position','domain', 'customcode', 'ga_token', 'extraseurl', 'gajsurl', 'gfsubmiteventpv', 'trackprefix', 'ignore_userlevel', 'internallink', 'internallinklabel', 'primarycrossdomain', 'othercrossdomains') as $option_name) {
|
218 |
if (isset($_POST[$option_name]))
|
219 |
$options[$option_name] = $_POST[$option_name];
|
222 |
}
|
223 |
|
224 |
foreach (array('extrase', 'trackoutbound', 'admintracking', 'trackadsense', 'allowanchor', 'allowlinker', 'allowhash', 'rsslinktagging', 'advancedsettings', 'trackregistration', 'theme_updated', 'cv_loggedin', 'cv_authorname', 'cv_category', 'cv_all_categories', 'cv_tags', 'cv_year', 'cv_post_type', 'outboundpageview', 'downloadspageview', 'trackcrossdomain','gajslocalhosting', 'manual_uastring', 'taggfsubmit', 'wpec_tracking', 'shopp_tracking', 'anonymizeip', 'trackcommentform', 'debug','firebuglite') as $option_name) {
|
225 |
+
if (isset($_POST[$option_name]) && $_POST[$option_name] == 'on')
|
226 |
$options[$option_name] = true;
|
227 |
else
|
228 |
$options[$option_name] = false;
|
241 |
$options['primarycrossdomain'] = $origin["domain"];
|
242 |
}
|
243 |
}
|
244 |
+
|
245 |
+
if ( function_exists('w3tc_pgcache_flush') )
|
246 |
+
w3tc_pgcache_flush();
|
247 |
+
|
248 |
+
if ( function_exists('w3tc_dbcache_flush') )
|
249 |
+
w3tc_dbcache_flush();
|
250 |
+
|
251 |
+
if ( function_exists('w3tc_minify_flush') )
|
252 |
+
w3tc_minify_flush();
|
253 |
+
|
254 |
+
if ( function_exists('w3tc_objectcache_flush') )
|
255 |
w3tc_objectcache_flush();
|
256 |
+
|
257 |
+
if ( function_exists('wp_cache_clear_cache') )
|
258 |
wp_cache_clear_cache();
|
|
|
|
|
259 |
|
260 |
+
$options['msg'] = "<div id=\"updatemessage\" class=\"updated fade\"><p>Google Analytics <strong>settings updated</strong>.</p></div>\n";
|
261 |
$options['msg'] .= "<script type=\"text/javascript\">setTimeout(function(){jQuery('#updatemessage').hide('slow');}, 3000);</script>";
|
262 |
}
|
263 |
update_option($this->optionname, $options);
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://yoast.com/donate/
|
|
4 |
Tags: analytics, google analytics, statistics, tracking, stats, google
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.3
|
7 |
-
Stable tag: 4.2.
|
8 |
|
9 |
Track your WordPress site easily and with lots of metadata: views per author & category, automatic tracking of outbound clicks and pageviews.
|
10 |
|
@@ -58,6 +58,11 @@ This section describes how to install the plugin and get it working.
|
|
58 |
|
59 |
== Changelog ==
|
60 |
|
|
|
|
|
|
|
|
|
|
|
61 |
= 4.2.3 =
|
62 |
|
63 |
* Removed Dashboard widget.
|
4 |
Tags: analytics, google analytics, statistics, tracking, stats, google
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.3
|
7 |
+
Stable tag: 4.2.4
|
8 |
|
9 |
Track your WordPress site easily and with lots of metadata: views per author & category, automatic tracking of outbound clicks and pageviews.
|
10 |
|
58 |
|
59 |
== Changelog ==
|
60 |
|
61 |
+
= 4.2.4 =
|
62 |
+
|
63 |
+
* Fixed bug introduced with 4.2.3 that wouldn't allow saving settings.
|
64 |
+
* Now only flushing enabled W3TC caches.
|
65 |
+
|
66 |
= 4.2.3 =
|
67 |
|
68 |
* Removed Dashboard widget.
|
yst_plugin_tools.php
CHANGED
@@ -84,7 +84,7 @@ if (!class_exists('Yoast_GA_Plugin_Admin')) {
|
|
84 |
function checkbox($id) {
|
85 |
$options = get_option( $this->optionname );
|
86 |
$checked = false;
|
87 |
-
if ( isset($options[$id]) )
|
88 |
$checked = true;
|
89 |
return '<input type="checkbox" id="'.$id.'" name="'.$id.'"'. checked($checked,true,false).'/>';
|
90 |
}
|
84 |
function checkbox($id) {
|
85 |
$options = get_option( $this->optionname );
|
86 |
$checked = false;
|
87 |
+
if ( isset($options[$id]) && $options[$id] == 1 )
|
88 |
$checked = true;
|
89 |
return '<input type="checkbox" id="'.$id.'" name="'.$id.'"'. checked($checked,true,false).'/>';
|
90 |
}
|