Version Description
Release Date: September 4th, 2014
- Bugfixes:
- Fix small error in GA setup error link.
- Fix bug that would remove attributes from links.
- Added Try/Catch around connect to Google Analytics to prevent uncaught exceptions.
- Move require of function file to prevent error with already defined functions.
- Fix bug that sometimes prevented saving user roles to be ignored.
- Fix several notices.
- Enhancements:
- Add links to Settings page and Knowledge Base on plugins page.
- No longer store result from Google API in the main option, saves memory on frontend.
Download this release
Release Info
Developer | joostdevalk |
Plugin | Google Analytics for WordPress by MonsterInsights |
Version | 5.0.4 |
Comparing to | |
See all releases |
Code changes from version 5.0.3 to 5.0.4
- admin/class-admin.php +23 -0
- frontend/class-frontend.php +2 -2
- frontend/class-universal.php +0 -1
- googleanalytics.php +6 -6
- readme.txt +18 -1
admin/class-admin.php
CHANGED
@@ -27,6 +27,8 @@ if ( ! class_exists( 'Yoast_GA_Admin' ) ) {
|
|
27 |
add_action( 'admin_menu', array( $this, 'create_menu' ), 5 );
|
28 |
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
29 |
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) );
|
|
|
|
|
30 |
}
|
31 |
|
32 |
/**
|
@@ -165,6 +167,27 @@ if ( ! class_exists( 'Yoast_GA_Admin' ) ) {
|
|
165 |
return self::$instance;
|
166 |
}
|
167 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
/**
|
169 |
* Create the admin menu
|
170 |
*
|
27 |
add_action( 'admin_menu', array( $this, 'create_menu' ), 5 );
|
28 |
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
29 |
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) );
|
30 |
+
|
31 |
+
add_filter( 'plugin_action_links_' . plugin_basename( GAWP_FILE ), array( $this, 'add_action_links' ), 10, 2 );
|
32 |
}
|
33 |
|
34 |
/**
|
167 |
return self::$instance;
|
168 |
}
|
169 |
|
170 |
+
/**
|
171 |
+
* Add a link to the settings page to the plugins list
|
172 |
+
*
|
173 |
+
* @staticvar string $this_plugin holds the directory & filename for the plugin
|
174 |
+
*
|
175 |
+
* @param array $links array of links for the plugins, adapted when the current plugin is found.
|
176 |
+
* @param string $file the filename for the current plugin, which the filter loops through.
|
177 |
+
*
|
178 |
+
* @return array $links
|
179 |
+
*/
|
180 |
+
function add_action_links( $links, $file ) {
|
181 |
+
// add link to knowledgebase
|
182 |
+
$faq_link = '<a title="Yoast Knowledge Base" href="http://kb.yoast.com/category/43-google-analytics-for-wordpress">' . __( 'FAQ', 'google-analytics-for-wordpress' ) . '</a>';
|
183 |
+
array_unshift( $links, $faq_link );
|
184 |
+
|
185 |
+
$settings_link = '<a href="' . esc_url( admin_url( 'admin.php?page=yst_ga_settings' ) ) . '">' . __( 'Settings', 'google-analytics-for-wordpress' ) . '</a>';
|
186 |
+
array_unshift( $links, $settings_link );
|
187 |
+
|
188 |
+
return $links;
|
189 |
+
}
|
190 |
+
|
191 |
/**
|
192 |
* Create the admin menu
|
193 |
*
|
frontend/class-frontend.php
CHANGED
@@ -192,9 +192,9 @@ if ( ! class_exists( 'Yoast_GA_Frontend' ) ) {
|
|
192 |
return $link_attribute;
|
193 |
} else {
|
194 |
if ( ! is_null( $onclick ) ) {
|
195 |
-
return 'onclick="' . $onclick . '"';
|
196 |
} else {
|
197 |
-
return
|
198 |
}
|
199 |
}
|
200 |
}
|
192 |
return $link_attribute;
|
193 |
} else {
|
194 |
if ( ! is_null( $onclick ) ) {
|
195 |
+
return 'onclick="' . $onclick . '" '.$link_attribute;
|
196 |
} else {
|
197 |
+
return $link_attribute;
|
198 |
}
|
199 |
}
|
200 |
}
|
frontend/class-universal.php
CHANGED
@@ -178,7 +178,6 @@ if ( ! class_exists( 'Yoast_GA_Universal' ) ) {
|
|
178 |
}
|
179 |
|
180 |
$link['link_attributes'] = $this->output_add_onclick( $link['link_attributes'], $onclick );
|
181 |
-
|
182 |
return '<a href="' . $full_url . '" ' . $link['link_attributes'] . '>' . $link['link_text'] . '</a>';
|
183 |
|
184 |
}
|
178 |
}
|
179 |
|
180 |
$link['link_attributes'] = $this->output_add_onclick( $link['link_attributes'], $onclick );
|
|
|
181 |
return '<a href="' . $full_url . '" ' . $link['link_attributes'] . '>' . $link['link_text'] . '</a>';
|
182 |
|
183 |
}
|
googleanalytics.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Google Analytics by Yoast
|
4 |
-
Plugin URI:
|
5 |
-
Description: This plugin makes it simple to add Google Analytics to your WordPress blog, adding lots of features, eg.
|
6 |
-
Author:
|
7 |
-
Version: 5.0.
|
8 |
Requires at least: 3.8
|
9 |
-
Author URI:
|
10 |
License: GPL v3
|
11 |
Text Domain: google-analytics-for-wordpress
|
12 |
Domain Path: /languages
|
@@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
30 |
|
31 |
// This plugin was originally based on Rich Boakes' Analytics plugin: http://boakes.org/analytics, but has since been rewritten and refactored multiple times.
|
32 |
|
33 |
-
define( "GAWP_VERSION", '5.0.
|
34 |
|
35 |
define( "GAWP_FILE", __FILE__ );
|
36 |
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Google Analytics by Yoast
|
4 |
+
Plugin URI: https://yoast.com/wordpress/plugins/google-analytics/#utm_source=wordpress&utm_medium=plugin&utm_campaign=wpgaplugin&utm_content=v504
|
5 |
+
Description: This plugin makes it simple to add Google Analytics to your WordPress blog, adding lots of features, eg. error page, search result and automatic clickout and download tracking.
|
6 |
+
Author: Team Yoast
|
7 |
+
Version: 5.0.4
|
8 |
Requires at least: 3.8
|
9 |
+
Author URI: https://yoast.com/
|
10 |
License: GPL v3
|
11 |
Text Domain: google-analytics-for-wordpress
|
12 |
Domain Path: /languages
|
30 |
|
31 |
// This plugin was originally based on Rich Boakes' Analytics plugin: http://boakes.org/analytics, but has since been rewritten and refactored multiple times.
|
32 |
|
33 |
+
define( "GAWP_VERSION", '5.0.4' );
|
34 |
|
35 |
define( "GAWP_FILE", __FILE__ );
|
36 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://yoast.com/donate/
|
|
4 |
Tags: analytics, google analytics, statistics, tracking, stats, google, yoast
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.0
|
7 |
-
Stable tag: 5.0.
|
8 |
|
9 |
Track your WordPress site easily with the latest tracking codes and lots added data for search result pages and error pages.
|
10 |
|
@@ -49,6 +49,23 @@ This section describes how to install the plugin and get it working.
|
|
49 |
|
50 |
== Changelog ==
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
= 5.0.2 =
|
53 |
Release Date: September 4th, 2014
|
54 |
|
4 |
Tags: analytics, google analytics, statistics, tracking, stats, google, yoast
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.0
|
7 |
+
Stable tag: 5.0.4
|
8 |
|
9 |
Track your WordPress site easily with the latest tracking codes and lots added data for search result pages and error pages.
|
10 |
|
49 |
|
50 |
== Changelog ==
|
51 |
|
52 |
+
= 5.0.4 =
|
53 |
+
Release Date: September 4th, 2014
|
54 |
+
|
55 |
+
* Bugfixes:
|
56 |
+
* Fix small error in GA setup error link.
|
57 |
+
* Fix bug that would remove attributes from links.
|
58 |
+
* Added Try/Catch around connect to Google Analytics to prevent uncaught exceptions.
|
59 |
+
* Move require of function file to prevent error with already defined functions.
|
60 |
+
* Fix bug that sometimes prevented saving user roles to be ignored.
|
61 |
+
* Fix several notices.
|
62 |
+
* Enhancements:
|
63 |
+
* Add links to Settings page and Knowledge Base on plugins page.
|
64 |
+
* No longer store result from Google API in the main option, saves memory on frontend.
|
65 |
+
|
66 |
+
= 5.0.3 =
|
67 |
+
Skipped due to error during release.
|
68 |
+
|
69 |
= 5.0.2 =
|
70 |
Release Date: September 4th, 2014
|
71 |
|