Version Description
- [Fix] The new Browscap Data caused some Fatal Error issues for some users running PHP 5.6. We would like to thank all those who helped us narrow down the issue.
- [Update] Moved the new Browscap Data file from the plugin's folder to
wp-content/uploads/wp-slimstat
to address concerns with permissions raised by some of our users.
Download this release
Release Info
Developer | coolmann |
Plugin | Slimstat Analytics |
Version | 4.4.3 |
Comparing to | |
See all releases |
Code changes from version 4.4.2 to 4.4.3
- admin/wp-slimstat-admin.php +10 -2
- browscap/browser.php +12 -2
- readme.txt +5 -1
- wp-slimstat.php +15 -7
admin/wp-slimstat-admin.php
CHANGED
@@ -11,7 +11,7 @@ class wp_slimstat_admin {
|
|
11 |
* Init -- Sets things up.
|
12 |
*/
|
13 |
public static function init() {
|
14 |
-
self::$admin_notice = "
|
15 |
self::$admin_notice .= '<br/><br/><a id="slimstat-hide-admin-notice" href="#" class="button-secondary">Got it, thanks</a>';
|
16 |
|
17 |
// Load language files
|
@@ -641,12 +641,20 @@ class wp_slimstat_admin {
|
|
641 |
|
642 |
// --- Updates for version 4.3.7 ---
|
643 |
if ( version_compare( wp_slimstat::$settings[ 'version' ], '4.3.7', '<' ) ) {
|
644 |
-
|
645 |
// Previous versions of Slimstat were scheduling multiple purges in some cases, let's clean this up
|
646 |
wp_clear_scheduled_hook( 'wp_slimstat_purge' );
|
647 |
}
|
648 |
// --- END: Updates for version 4.3.7 ---
|
649 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
650 |
// Now we can update the version stored in the database
|
651 |
wp_slimstat::$settings[ 'version' ] = wp_slimstat::$version;
|
652 |
|
11 |
* Init -- Sets things up.
|
12 |
*/
|
13 |
public static function init() {
|
14 |
+
self::$admin_notice = "The new Browscap Data caused a few white screens of death and related issues for a handful of users running PHP 5.6. We would like to thank all those who helped us narrow down the issue, for their patience and for understanding that regardless of how much you test your software, there's always a chance that you will hit a snag. We also moved the location of the data file to wp-content/uploads, as some other users were experiencing permission issues when Slimstat tried to update the file within the plugin's folder. So don't worry if you are asked to install the Browscap data file again. As usual, let us know if you experience any issues by contacting us through <a target='_blank' href='https://wordpress.org/support/plugin/wp-slimstat'>the official support forum</a>.";
|
15 |
self::$admin_notice .= '<br/><br/><a id="slimstat-hide-admin-notice" href="#" class="button-secondary">Got it, thanks</a>';
|
16 |
|
17 |
// Load language files
|
641 |
|
642 |
// --- Updates for version 4.3.7 ---
|
643 |
if ( version_compare( wp_slimstat::$settings[ 'version' ], '4.3.7', '<' ) ) {
|
644 |
+
|
645 |
// Previous versions of Slimstat were scheduling multiple purges in some cases, let's clean this up
|
646 |
wp_clear_scheduled_hook( 'wp_slimstat_purge' );
|
647 |
}
|
648 |
// --- END: Updates for version 4.3.7 ---
|
649 |
|
650 |
+
// --- Updates for version 4.4.3 ---
|
651 |
+
if ( version_compare( wp_slimstat::$settings[ 'version' ], '4.4.3', '<' ) ) {
|
652 |
+
|
653 |
+
// Previous versions of Slimstat were scheduling multiple purges in some cases, let's clean this up
|
654 |
+
wp_slimstat::$settings[ 'enable_ads_network' ] = 'yes';
|
655 |
+
}
|
656 |
+
// --- END: Updates for version 4.4.3 ---
|
657 |
+
|
658 |
// Now we can update the version stored in the database
|
659 |
wp_slimstat::$settings[ 'version' ] = wp_slimstat::$version;
|
660 |
|
browscap/browser.php
CHANGED
@@ -17,9 +17,19 @@ class slim_browser {
|
|
17 |
|
18 |
if ( self::$browscap_exists ) {
|
19 |
wp_slimstat::update_browscap_database();
|
20 |
-
include_once( wp_slimstat::$browscap_path );
|
21 |
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
}
|
25 |
|
17 |
|
18 |
if ( self::$browscap_exists ) {
|
19 |
wp_slimstat::update_browscap_database();
|
20 |
+
@include_once( wp_slimstat::$browscap_path );
|
21 |
|
22 |
+
if ( function_exists( 'slimstat_get_browser_from_browscap' ) ) {
|
23 |
+
self::$browser = slimstat_get_browser_from_browscap( self::$browser, $browsers, $userAgents, $patterns, $properties );
|
24 |
+
}
|
25 |
+
else {
|
26 |
+
@unlink( wp_slimstat::$browscap_path );
|
27 |
+
wp_slimstat::update_browscap_database();
|
28 |
+
|
29 |
+
if ( function_exists( 'slimstat_get_browser_from_browscap' ) ) {
|
30 |
+
self::$browser = slimstat_get_browser_from_browscap( self::$browser, $browsers, $userAgents, $patterns, $properties );
|
31 |
+
}
|
32 |
+
}
|
33 |
}
|
34 |
}
|
35 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: analytics, statistics, counter, tracking, reports, wassup, geolocation, on
|
|
5 |
Text Domain: wp-slimstat
|
6 |
Requires at least: 3.8
|
7 |
Tested up to: 4.6
|
8 |
-
Stable tag: 4.4.
|
9 |
|
10 |
== Description ==
|
11 |
[youtube https://www.youtube.com/watch?v=iJCtjxArq4U]
|
@@ -72,6 +72,10 @@ Our knowledge base is available on our [support center](http://docs.wp-slimstat.
|
|
72 |
|
73 |
== Changelog ==
|
74 |
|
|
|
|
|
|
|
|
|
75 |
= 4.4.2 =
|
76 |
* [Note] You may have noticed that our support service has become slightly less efficient in the last couple of months. Aside from having our (small) team use their summer vacation days, our support specialist Luigi found a full-time job and decided to start the next chapter of his career. We wish him the best of luck in his future endeavors. At the same time, we are investigating our options to keep providing the excellent level of support that many people mention when leaving a 5-star review for Slimstat. In order to scale up and attract new talent, we might decide to switch to a paid support model, where our users will need to purchase packages to get help for nontrivial requests. Please stay tuned while we discuss this internally.
|
77 |
* [New] We’ve been working on optimizing the Browscap User Agent data file, and following the model we introduced a while ago, we implemented a feature that keeps the data file always up-to-date, by automatically downloading the latest version. So far, we were forced to release a Slimstat update in order to distribute a new version of the data file, which was not ideal. By switching to a dynamic workflow, you will not need to update Slimstat anymore in order to have the latest version of Browscap running on your server. Also, the plugin zip file is much smaller now. Cool, huh?
|
5 |
Text Domain: wp-slimstat
|
6 |
Requires at least: 3.8
|
7 |
Tested up to: 4.6
|
8 |
+
Stable tag: 4.4.3
|
9 |
|
10 |
== Description ==
|
11 |
[youtube https://www.youtube.com/watch?v=iJCtjxArq4U]
|
72 |
|
73 |
== Changelog ==
|
74 |
|
75 |
+
= 4.4.3 =
|
76 |
+
* [Fix] The new Browscap Data caused some Fatal Error issues for some users running PHP 5.6. We would like to thank all those who helped us narrow down the issue.
|
77 |
+
* [Update] Moved the new Browscap Data file from the plugin's folder to `wp-content/uploads/wp-slimstat` to address concerns with permissions raised by some of our users.
|
78 |
+
|
79 |
= 4.4.2 =
|
80 |
* [Note] You may have noticed that our support service has become slightly less efficient in the last couple of months. Aside from having our (small) team use their summer vacation days, our support specialist Luigi found a full-time job and decided to start the next chapter of his career. We wish him the best of luck in his future endeavors. At the same time, we are investigating our options to keep providing the excellent level of support that many people mention when leaving a 5-star review for Slimstat. In order to scale up and attract new talent, we might decide to switch to a paid support model, where our users will need to purchase packages to get help for nontrivial requests. Please stay tuned while we discuss this internally.
|
81 |
* [New] We’ve been working on optimizing the Browscap User Agent data file, and following the model we introduced a while ago, we implemented a feature that keeps the data file always up-to-date, by automatically downloading the latest version. So far, we were forced to release a Slimstat update in order to distribute a new version of the data file, which was not ideal. By switching to a dynamic workflow, you will not need to update Slimstat anymore in order to have the latest version of Browscap running on your server. Also, the plugin zip file is much smaller now. Cool, huh?
|
wp-slimstat.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Slim Stat Analytics
|
4 |
Plugin URI: http://wordpress.org/plugins/wp-slimstat/
|
5 |
Description: The leading web analytics plugin for WordPress
|
6 |
-
Version: 4.4.
|
7 |
Author: Jason Crouse
|
8 |
Author URI: http://www.wp-slimstat.com/
|
9 |
Text Domain: wp-slimstat
|
@@ -15,7 +15,7 @@ if ( !empty( wp_slimstat::$settings ) ) {
|
|
15 |
}
|
16 |
|
17 |
class wp_slimstat {
|
18 |
-
public static $version = '4.4.
|
19 |
public static $settings = array();
|
20 |
public static $options = array(); // To be removed, here just for backward compatibility
|
21 |
|
@@ -71,11 +71,12 @@ class wp_slimstat {
|
|
71 |
if ( is_multisite() && ! ( is_main_network() && is_main_site() && defined( 'MULTISITE' ) ) ) {
|
72 |
self::$maxmind_path = str_replace( '/sites/' . get_current_blog_id(), '', self::$maxmind_path );
|
73 |
}
|
74 |
-
self::$maxmind_path = apply_filters( 'slimstat_maxmind_path', self::$maxmind_path );
|
75 |
self::$maxmind_path = self::$maxmind_path[ 'basedir' ] . '/wp-slimstat/maxmind.dat';
|
|
|
76 |
|
77 |
// Path to the Browscap Database file
|
78 |
-
self::$browscap_path =
|
|
|
79 |
|
80 |
// Path to wp-content folder, used to detect caching plugins via advanced-cache.php
|
81 |
if ( file_exists( dirname( dirname( plugin_dir_path( __FILE__ ) ) ) . '/advanced-cache.php' ) ) {
|
@@ -1200,17 +1201,24 @@ class wp_slimstat {
|
|
1200 |
if ( intval( $local_version ) != intval( $remote_version ) ) {
|
1201 |
$download_flag = true;
|
1202 |
}
|
1203 |
-
|
|
|
|
|
|
|
1204 |
fclose( $handle );
|
1205 |
}
|
1206 |
|
1207 |
// Download the most recent version of our pre-processed Browscap database
|
1208 |
if ( $download_flag ) {
|
1209 |
$response = wp_safe_remote_get( 'http://s3.amazonaws.com/browscap/browscap-db.php', array( 'timeout' => 300, 'stream' => true, 'filename' => self::$browscap_path ) );
|
1210 |
-
if ( 200 != wp_remote_retrieve_response_code( $response ) ) {
|
1211 |
-
unlink( self::$browscap_path );
|
1212 |
return __( 'There was an error downloading the Browscap data file from our server. Please try again later.', 'wp-slimstat' );
|
1213 |
}
|
|
|
|
|
|
|
|
|
1214 |
}
|
1215 |
|
1216 |
return 0;
|
3 |
Plugin Name: Slim Stat Analytics
|
4 |
Plugin URI: http://wordpress.org/plugins/wp-slimstat/
|
5 |
Description: The leading web analytics plugin for WordPress
|
6 |
+
Version: 4.4.3
|
7 |
Author: Jason Crouse
|
8 |
Author URI: http://www.wp-slimstat.com/
|
9 |
Text Domain: wp-slimstat
|
15 |
}
|
16 |
|
17 |
class wp_slimstat {
|
18 |
+
public static $version = '4.4.3';
|
19 |
public static $settings = array();
|
20 |
public static $options = array(); // To be removed, here just for backward compatibility
|
21 |
|
71 |
if ( is_multisite() && ! ( is_main_network() && is_main_site() && defined( 'MULTISITE' ) ) ) {
|
72 |
self::$maxmind_path = str_replace( '/sites/' . get_current_blog_id(), '', self::$maxmind_path );
|
73 |
}
|
|
|
74 |
self::$maxmind_path = self::$maxmind_path[ 'basedir' ] . '/wp-slimstat/maxmind.dat';
|
75 |
+
self::$maxmind_path = apply_filters( 'slimstat_maxmind_path', self::$maxmind_path );
|
76 |
|
77 |
// Path to the Browscap Database file
|
78 |
+
self::$browscap_path = dirname( self::$maxmind_path ) . '/browscap-db.php';
|
79 |
+
self::$browscap_path = apply_filters( 'slimstat_browscap_path', self::$browscap_path );
|
80 |
|
81 |
// Path to wp-content folder, used to detect caching plugins via advanced-cache.php
|
82 |
if ( file_exists( dirname( dirname( plugin_dir_path( __FILE__ ) ) ) . '/advanced-cache.php' ) ) {
|
1201 |
if ( intval( $local_version ) != intval( $remote_version ) ) {
|
1202 |
$download_flag = true;
|
1203 |
}
|
1204 |
+
else {
|
1205 |
+
touch( self::$browscap_path );
|
1206 |
+
}
|
1207 |
+
|
1208 |
fclose( $handle );
|
1209 |
}
|
1210 |
|
1211 |
// Download the most recent version of our pre-processed Browscap database
|
1212 |
if ( $download_flag ) {
|
1213 |
$response = wp_safe_remote_get( 'http://s3.amazonaws.com/browscap/browscap-db.php', array( 'timeout' => 300, 'stream' => true, 'filename' => self::$browscap_path ) );
|
1214 |
+
if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
|
1215 |
+
@unlink( self::$browscap_path );
|
1216 |
return __( 'There was an error downloading the Browscap data file from our server. Please try again later.', 'wp-slimstat' );
|
1217 |
}
|
1218 |
+
|
1219 |
+
if ( !file_exists( self::$browscap_path ) ) {
|
1220 |
+
return __( 'There was an error saving the Browscap data file on your server. Please check your server permissions.', 'wp-slimstat' );
|
1221 |
+
}
|
1222 |
}
|
1223 |
|
1224 |
return 0;
|