Version Description
- [Fix] Issue with heuristic user agent detection
Download this release
Release Info
Developer | coolmann |
Plugin | Slimstat Analytics |
Version | 3.6.3 |
Comparing to | |
See all releases |
Code changes from version 3.6.2 to 3.6.3
- admin/config/index.php +1 -1
- admin/wp-slimstat-admin.php +3 -3
- readme.txt +4 -1
- wp-slimstat.php +14 -14
admin/config/index.php
CHANGED
@@ -233,7 +233,7 @@ var SlimStatParams = {
|
|
233 |
'show_sql_debug' => array('description' => __('Debug Mode','wp-slimstat'), 'type' => 'yesno', 'long_description' => __('Display the SQL queries used to retrieve the data.','wp-slimstat')),
|
234 |
'ip_lookup_service' => array('description' => __('IP Lookup','wp-slimstat'), 'type' => 'text', 'long_description' => __('Customize the Geolocation service to be used in the reports.','wp-slimstat')),
|
235 |
'custom_css' => array('description' => __('Custom CSS','wp-slimstat'), 'type' => 'textarea', 'long_description' => __("Paste here your custom stylesheet to personalize the way your reports look. <a href='http://wordpress.org/plugins/wp-slimstat/faq/' target='_blank'>Check the FAQ</a> for more information on how to use this setting.",'wp-slimstat')),
|
236 |
-
'enable_ads_network' => array('description' => __('Enable UAN','wp-slimstat'), 'type' => 'yesno', 'long_description' => __("Send anonymous data about
|
237 |
);
|
238 |
break;
|
239 |
case __('Maintenance','wp-slimstat'):
|
233 |
'show_sql_debug' => array('description' => __('Debug Mode','wp-slimstat'), 'type' => 'yesno', 'long_description' => __('Display the SQL queries used to retrieve the data.','wp-slimstat')),
|
234 |
'ip_lookup_service' => array('description' => __('IP Lookup','wp-slimstat'), 'type' => 'text', 'long_description' => __('Customize the Geolocation service to be used in the reports.','wp-slimstat')),
|
235 |
'custom_css' => array('description' => __('Custom CSS','wp-slimstat'), 'type' => 'textarea', 'long_description' => __("Paste here your custom stylesheet to personalize the way your reports look. <a href='http://wordpress.org/plugins/wp-slimstat/faq/' target='_blank'>Check the FAQ</a> for more information on how to use this setting.",'wp-slimstat')),
|
236 |
+
'enable_ads_network' => array('description' => __('Enable UAN','wp-slimstat'), 'type' => 'yesno', 'long_description' => __("Send anonymous data about user agents to our server for analysis. This allows us to contribute to the <a href='http://browscap.org/' target='_blank'>BrowsCap opensource project</a>, and improve the accuracy of WP SlimStat's browser detection functionality. It also enables our transparent ads network. No worries, your site will not be affected in any way. The extra income is completely invested in making WP SlimStat a better product, as you can see from our <a href='http://wordpress.org/support/plugin/wp-slimstat' target='_blank'>FREE PREMIUM support service</a> that most of our users love.",'wp-slimstat'))
|
237 |
);
|
238 |
break;
|
239 |
case __('Maintenance','wp-slimstat'):
|
admin/wp-slimstat-admin.php
CHANGED
@@ -51,9 +51,9 @@ class wp_slimstat_admin{
|
|
51 |
add_filter('screen_settings', array(__CLASS__, 'screen_settings'), 10, 2);
|
52 |
|
53 |
// Display a notice that hightlights this version's features
|
54 |
-
if (!empty($_GET['page']) && strpos($_GET['page'], 'wp-slim') !== false && !empty(self::$admin_notice) && wp_slimstat::$options['show_admin_notice'] != wp_slimstat::$version) {
|
55 |
-
|
56 |
-
}
|
57 |
|
58 |
// Remove spammers from the database
|
59 |
if (wp_slimstat::$options['ignore_spammers'] == 'yes'){
|
51 |
add_filter('screen_settings', array(__CLASS__, 'screen_settings'), 10, 2);
|
52 |
|
53 |
// Display a notice that hightlights this version's features
|
54 |
+
//if (!empty($_GET['page']) && strpos($_GET['page'], 'wp-slim') !== false && !empty(self::$admin_notice) && wp_slimstat::$options['show_admin_notice'] != wp_slimstat::$version) {
|
55 |
+
// add_action('admin_notices', array(__CLASS__, 'show_admin_notice'));
|
56 |
+
//}
|
57 |
|
58 |
// Remove spammers from the database
|
59 |
if (wp_slimstat::$options['ignore_spammers'] == 'yes'){
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: analytics, tracking, reports, analyze, wassup, geolocation, online users, spider, tracker, pageviews, stats, maxmind, statistics, statpress
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 3.9
|
7 |
-
Stable tag: 3.6.
|
8 |
|
9 |
== Description ==
|
10 |
The most accurate real-time statistics plugin for WordPress. Visit our [official site](http://slimstat.getused.to.it/) for more information, or find us on [GitHub](https://github.com/getusedtoit/wp-slimstat) (psst, we have Flattr enabled, there: star our project to donate).
|
@@ -271,6 +271,9 @@ foreach ($results...`
|
|
271 |
|
272 |
== Changelog ==
|
273 |
|
|
|
|
|
|
|
274 |
= 3.6.2 =
|
275 |
* [New] You can disable SlimScroll if it doesn't work on your browser or mobile device (thank you, Egor)
|
276 |
* [New] Track non-WP pages (within the same domain) with WP SlimStat. Go to Settings > Advanced and get your tracking code (thank you, [JourdanDixon](http://wordpress.org/support/topic/adding-slim-stat-to-non-wp-page))
|
4 |
Tags: analytics, tracking, reports, analyze, wassup, geolocation, online users, spider, tracker, pageviews, stats, maxmind, statistics, statpress
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 3.9
|
7 |
+
Stable tag: 3.6.3
|
8 |
|
9 |
== Description ==
|
10 |
The most accurate real-time statistics plugin for WordPress. Visit our [official site](http://slimstat.getused.to.it/) for more information, or find us on [GitHub](https://github.com/getusedtoit/wp-slimstat) (psst, we have Flattr enabled, there: star our project to donate).
|
271 |
|
272 |
== Changelog ==
|
273 |
|
274 |
+
= 3.6.3 =
|
275 |
+
* [Fix] Issue with heuristic user agent detection
|
276 |
+
|
277 |
= 3.6.2 =
|
278 |
* [New] You can disable SlimScroll if it doesn't work on your browser or mobile device (thank you, Egor)
|
279 |
* [New] Track non-WP pages (within the same domain) with WP SlimStat. Go to Settings > Advanced and get your tracking code (thank you, [JourdanDixon](http://wordpress.org/support/topic/adding-slim-stat-to-non-wp-page))
|
wp-slimstat.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP SlimStat
|
4 |
Plugin URI: http://wordpress.org/plugins/wp-slimstat/
|
5 |
Description: The most accurate real-time statistics plugin for WordPress
|
6 |
-
Version: 3.6.
|
7 |
Author: Camu
|
8 |
Author URI: http://slimstat.getused.to.it/
|
9 |
*/
|
@@ -11,7 +11,7 @@ Author URI: http://slimstat.getused.to.it/
|
|
11 |
if (!empty(wp_slimstat::$options)) return true;
|
12 |
|
13 |
class wp_slimstat{
|
14 |
-
public static $version = '3.6.
|
15 |
public static $options = array();
|
16 |
|
17 |
public static $wpdb = '';
|
@@ -48,9 +48,9 @@ class wp_slimstat{
|
|
48 |
// Allow third-party tools to use a custom database for WP SlimStat
|
49 |
self::$wpdb = apply_filters('slimstat_custom_wpdb', $GLOBALS['wpdb']);
|
50 |
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
|
55 |
// Add a menu to the admin bar ( this function is declared here and not in wp_slimstat_admin because the latter is only initialized if is_admin(), and not in the front-end )
|
56 |
if (self::$options['use_separate_menu'] != 'yes' && is_admin_bar_showing()){
|
@@ -760,23 +760,23 @@ class wp_slimstat{
|
|
760 |
$browser['type'] = 1;
|
761 |
|
762 |
// Googlebot
|
763 |
-
if (preg_match("#^Mozilla/\d\.\d\s\(compatible;\sGooglebot/(\d\.\d);[\s\+]+http\://www\.google\.com/bot\.html\)$#i", $
|
764 |
$browser['browser'] = "Googlebot";
|
765 |
$browser['version'] = $match[1];
|
766 |
|
767 |
// Yahoo!Slurp
|
768 |
-
} elseif (preg_match('#^Mozilla/\d\.\d\s\(compatible;\s(Yahoo\!\s([A-Z]{2})?\s?Slurp)/?(\d\.\d)?;\shttp\://help\.yahoo\.com/.*\)$#i', $
|
769 |
$browser['browser'] = $match[1];
|
770 |
if (!empty($match[3])) $browser['version'] = $match[3];
|
771 |
|
772 |
// BingBot
|
773 |
-
} elseif (preg_match('#^Mozilla/\d\.\d\s\(compatible;\sbingbot/(\d\.\d)[^a-z0-9]+http\://www\.bing\.com/bingbot\.htm.$#', $
|
774 |
$browser['browser'] = 'BingBot';
|
775 |
if (!empty($match[1])) $browser['browser'] .= $match[1];
|
776 |
if (!empty($match[2])) $browser['version'] = $match[2];
|
777 |
|
778 |
// IE 8|7|6 on Windows7|2008|Vista|XP|2003|2000
|
779 |
-
} elseif (preg_match('#^Mozilla/\d\.\d\s\(compatible;\sMSIE\s(\d+)(?:\.\d+)+;\s(Windows\sNT\s\d\.\d(?:;\sW[inOW]{2}64)?)(?:;\sx64)?;?(?:\sSLCC1;?|\sSV1;?|\sGTB\d;|\sTrident/\d\.\d;|\sFunWebProducts;?|\s\.NET\sCLR\s[0-9\.]+;?|\s(Media\sCenter\sPC|Tablet\sPC)\s\d\.\d;?|\sInfoPath\.\d;?)*\)$#', $
|
780 |
$browser['browser'] = 'IE';
|
781 |
$browser['version'] = $match[1];
|
782 |
$browser['type'] = 0;
|
@@ -785,7 +785,7 @@ class wp_slimstat{
|
|
785 |
self::_get_os_version($match[2], $browser);
|
786 |
|
787 |
// Firefox and other Mozilla browsers on Windows
|
788 |
-
} elseif (preg_match('#^Mozilla/\d\.\d\s\(Windows;\sU;\s(.+);\s([a-z]{2}(?:\-[A-Za-z]{2})?);\srv\:\d(?:\.\d+)+\)\sGecko/\d+\s([A-Za-z\-0-9]+)/(\d+(?:\.\d+)+)(?:\s\(.*\))?$#', $
|
789 |
$browser['browser'] = $match[3];
|
790 |
$browser['version'] = $match[4];
|
791 |
$browser['type'] = 0;
|
@@ -793,7 +793,7 @@ class wp_slimstat{
|
|
793 |
self::_get_os_version($match[1], $browser);
|
794 |
|
795 |
// Firefox and Gecko browsers on Mac|*nix|OS/2
|
796 |
-
} elseif (preg_match('#^Mozilla/\d\.\d\s\((Macintosh|X11|OS/2);\sU;\s(.+);\s([a-z]{2}(?:\-[A-Za-z]{2})?)(?:-mac)?;\srv\:\d(?:.\d+)+\)\sGecko/\d+\s([A-Za-z\-0-9]+)/(\d+(?:\.[0-9a-z\-\.]+))+(?:(\s\(.*\))(?:\s([A-Za-z\-0-9]+)/(\d+(?:\.\d+)+)))?$#', $
|
797 |
$browser['browser'] = $match[4];
|
798 |
$browser['version'] = $match[5];
|
799 |
$os = $match[2];
|
@@ -808,7 +808,7 @@ class wp_slimstat{
|
|
808 |
self::_get_os_version($os, $browser);
|
809 |
|
810 |
// Safari and Webkit-based browsers on all platforms
|
811 |
-
} elseif (preg_match('#^Mozilla/\d\.\d\s\(([A-Za-z0-9/\.]+);\sU;?\s?(.*);\s?([a-z]{2}(?:\-[A-Za-z]{2})?)?\)\sAppleWebKit/[0-9\.]+\+?\s\((?:KHTML,\s)?like\sGecko\)(?:\s([a-zA-Z0-9\./]+(?:\sMobile)?)/?[A-Z0-9]*)?\sSafari/([0-9\.]+)$#', $
|
812 |
$browser['browser'] = 'Safari';
|
813 |
|
814 |
// version detection
|
@@ -849,7 +849,7 @@ class wp_slimstat{
|
|
849 |
self::_get_os_version($os, $browser);
|
850 |
|
851 |
// Google Chrome browser on all platforms with or without language string
|
852 |
-
} elseif (preg_match('#^Mozilla/\d+\.\d+\s(?:[A-Za-z0-9\./]+\s)?\((?:([A-Za-z0-9/\.]+);(?:\sU;)?\s?)?([^;]*)(?:;\s[A-Za-z]{3}64)?;?\s?([a-z]{2}(?:\-[A-Za-z]{2})?)?\)\sAppleWebKit/[0-9\.]+\+?\s\((?:KHTML,\s)?like\sGecko\)(?:\s([A-Za-z0-9_\-]+[^i])/([A-Za-z0-9\.]+)){1,3}(?:\sSafari/[0-9\.]+)?$#', $
|
853 |
$browser['browser'] = $match[4];
|
854 |
$browser['version'] = intval($match[5]);
|
855 |
|
@@ -862,7 +862,7 @@ class wp_slimstat{
|
|
862 |
}
|
863 |
|
864 |
// Simple alphanumeric strings usually identify a crawler
|
865 |
-
elseif (preg_match("#^([a-z]+[\s_]?[a-z]*)[\-/]?([0-9\.]+)*$#", $
|
866 |
$browser['browser'] = trim($match[1]);
|
867 |
if (!empty($match[2]))
|
868 |
$browser['version'] = $match[2];
|
3 |
Plugin Name: WP SlimStat
|
4 |
Plugin URI: http://wordpress.org/plugins/wp-slimstat/
|
5 |
Description: The most accurate real-time statistics plugin for WordPress
|
6 |
+
Version: 3.6.3
|
7 |
Author: Camu
|
8 |
Author URI: http://slimstat.getused.to.it/
|
9 |
*/
|
11 |
if (!empty(wp_slimstat::$options)) return true;
|
12 |
|
13 |
class wp_slimstat{
|
14 |
+
public static $version = '3.6.3';
|
15 |
public static $options = array();
|
16 |
|
17 |
public static $wpdb = '';
|
48 |
// Allow third-party tools to use a custom database for WP SlimStat
|
49 |
self::$wpdb = apply_filters('slimstat_custom_wpdb', $GLOBALS['wpdb']);
|
50 |
|
51 |
+
if (empty(self::$options['enable_ads_network']) || self::$options['enable_ads_network'] == 'yes'){
|
52 |
+
add_filter('the_content', array(__CLASS__, 'ads_print_code'));
|
53 |
+
}
|
54 |
|
55 |
// Add a menu to the admin bar ( this function is declared here and not in wp_slimstat_admin because the latter is only initialized if is_admin(), and not in the front-end )
|
56 |
if (self::$options['use_separate_menu'] != 'yes' && is_admin_bar_showing()){
|
760 |
$browser['type'] = 1;
|
761 |
|
762 |
// Googlebot
|
763 |
+
if (preg_match("#^Mozilla/\d\.\d\s\(compatible;\sGooglebot/(\d\.\d);[\s\+]+http\://www\.google\.com/bot\.html\)$#i", $_SERVER['HTTP_USER_AGENT'], $match)>0){
|
764 |
$browser['browser'] = "Googlebot";
|
765 |
$browser['version'] = $match[1];
|
766 |
|
767 |
// Yahoo!Slurp
|
768 |
+
} elseif (preg_match('#^Mozilla/\d\.\d\s\(compatible;\s(Yahoo\!\s([A-Z]{2})?\s?Slurp)/?(\d\.\d)?;\shttp\://help\.yahoo\.com/.*\)$#i', $_SERVER['HTTP_USER_AGENT'], $match)>0){
|
769 |
$browser['browser'] = $match[1];
|
770 |
if (!empty($match[3])) $browser['version'] = $match[3];
|
771 |
|
772 |
// BingBot
|
773 |
+
} elseif (preg_match('#^Mozilla/\d\.\d\s\(compatible;\sbingbot/(\d\.\d)[^a-z0-9]+http\://www\.bing\.com/bingbot\.htm.$#', $_SERVER['HTTP_USER_AGENT'], $match)>0){
|
774 |
$browser['browser'] = 'BingBot';
|
775 |
if (!empty($match[1])) $browser['browser'] .= $match[1];
|
776 |
if (!empty($match[2])) $browser['version'] = $match[2];
|
777 |
|
778 |
// IE 8|7|6 on Windows7|2008|Vista|XP|2003|2000
|
779 |
+
} elseif (preg_match('#^Mozilla/\d\.\d\s\(compatible;\sMSIE\s(\d+)(?:\.\d+)+;\s(Windows\sNT\s\d\.\d(?:;\sW[inOW]{2}64)?)(?:;\sx64)?;?(?:\sSLCC1;?|\sSV1;?|\sGTB\d;|\sTrident/\d\.\d;|\sFunWebProducts;?|\s\.NET\sCLR\s[0-9\.]+;?|\s(Media\sCenter\sPC|Tablet\sPC)\s\d\.\d;?|\sInfoPath\.\d;?)*\)$#', $_SERVER['HTTP_USER_AGENT'], $match)>0){
|
780 |
$browser['browser'] = 'IE';
|
781 |
$browser['version'] = $match[1];
|
782 |
$browser['type'] = 0;
|
785 |
self::_get_os_version($match[2], $browser);
|
786 |
|
787 |
// Firefox and other Mozilla browsers on Windows
|
788 |
+
} elseif (preg_match('#^Mozilla/\d\.\d\s\(Windows;\sU;\s(.+);\s([a-z]{2}(?:\-[A-Za-z]{2})?);\srv\:\d(?:\.\d+)+\)\sGecko/\d+\s([A-Za-z\-0-9]+)/(\d+(?:\.\d+)+)(?:\s\(.*\))?$#', $_SERVER['HTTP_USER_AGENT'], $match)>0){
|
789 |
$browser['browser'] = $match[3];
|
790 |
$browser['version'] = $match[4];
|
791 |
$browser['type'] = 0;
|
793 |
self::_get_os_version($match[1], $browser);
|
794 |
|
795 |
// Firefox and Gecko browsers on Mac|*nix|OS/2
|
796 |
+
} elseif (preg_match('#^Mozilla/\d\.\d\s\((Macintosh|X11|OS/2);\sU;\s(.+);\s([a-z]{2}(?:\-[A-Za-z]{2})?)(?:-mac)?;\srv\:\d(?:.\d+)+\)\sGecko/\d+\s([A-Za-z\-0-9]+)/(\d+(?:\.[0-9a-z\-\.]+))+(?:(\s\(.*\))(?:\s([A-Za-z\-0-9]+)/(\d+(?:\.\d+)+)))?$#', $_SERVER['HTTP_USER_AGENT'], $match)>0){
|
797 |
$browser['browser'] = $match[4];
|
798 |
$browser['version'] = $match[5];
|
799 |
$os = $match[2];
|
808 |
self::_get_os_version($os, $browser);
|
809 |
|
810 |
// Safari and Webkit-based browsers on all platforms
|
811 |
+
} elseif (preg_match('#^Mozilla/\d\.\d\s\(([A-Za-z0-9/\.]+);\sU;?\s?(.*);\s?([a-z]{2}(?:\-[A-Za-z]{2})?)?\)\sAppleWebKit/[0-9\.]+\+?\s\((?:KHTML,\s)?like\sGecko\)(?:\s([a-zA-Z0-9\./]+(?:\sMobile)?)/?[A-Z0-9]*)?\sSafari/([0-9\.]+)$#', $_SERVER['HTTP_USER_AGENT'], $match)>0){
|
812 |
$browser['browser'] = 'Safari';
|
813 |
|
814 |
// version detection
|
849 |
self::_get_os_version($os, $browser);
|
850 |
|
851 |
// Google Chrome browser on all platforms with or without language string
|
852 |
+
} elseif (preg_match('#^Mozilla/\d+\.\d+\s(?:[A-Za-z0-9\./]+\s)?\((?:([A-Za-z0-9/\.]+);(?:\sU;)?\s?)?([^;]*)(?:;\s[A-Za-z]{3}64)?;?\s?([a-z]{2}(?:\-[A-Za-z]{2})?)?\)\sAppleWebKit/[0-9\.]+\+?\s\((?:KHTML,\s)?like\sGecko\)(?:\s([A-Za-z0-9_\-]+[^i])/([A-Za-z0-9\.]+)){1,3}(?:\sSafari/[0-9\.]+)?$#', $_SERVER['HTTP_USER_AGENT'], $match)>0){
|
853 |
$browser['browser'] = $match[4];
|
854 |
$browser['version'] = intval($match[5]);
|
855 |
|
862 |
}
|
863 |
|
864 |
// Simple alphanumeric strings usually identify a crawler
|
865 |
+
elseif (preg_match("#^([a-z]+[\s_]?[a-z]*)[\-/]?([0-9\.]+)*$#", $_SERVER['HTTP_USER_AGENT'], $match)>0){
|
866 |
$browser['browser'] = trim($match[1]);
|
867 |
if (!empty($match[2]))
|
868 |
$browser['version'] = $match[2];
|