Version Description
Download this release
Release Info
Developer | patrickrobrecht |
Plugin | Statify |
Version | 1.7.2 |
Comparing to | |
See all releases |
Code changes from version 1.7.1 to 1.7.2
- CHANGELOG.md +5 -0
- inc/class-statify-dashboard.php +2 -2
- inc/class-statify-frontend.php +1 -2
- inc/class-statify.php +1 -3
- readme.txt +9 -24
- statify.php +2 -2
CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
# Changelog
|
2 |
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
|
3 |
|
|
|
|
|
|
|
|
|
|
|
4 |
## 1.7.1
|
5 |
* Fix refresh of the dashboard widget when settings have been changed through the settings page (#147)
|
6 |
* Fix _Cachify_ cache not being flushed after changing JavaScript settings (#152)
|
1 |
# Changelog
|
2 |
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
|
3 |
|
4 |
+
## 1.7.2
|
5 |
+
* Prevent JavaScript tracking from raising 400 for logged-in users, if tracking is disabled (#159)
|
6 |
+
* Use `wp_die()` instead of header and exit for AJAX requests (#160)
|
7 |
+
* Fix 1 day offset between display range and number of days evaluated in top lists (#162)
|
8 |
+
|
9 |
## 1.7.1
|
10 |
* Fix refresh of the dashboard widget when settings have been changed through the settings page (#147)
|
11 |
* Fix _Cachify_ cache not being flushed after changing JavaScript settings (#152)
|
inc/class-statify-dashboard.php
CHANGED
@@ -346,7 +346,7 @@ class Statify_Dashboard extends Statify {
|
|
346 |
} else {
|
347 |
$data['target'] = $wpdb->get_results(
|
348 |
$wpdb->prepare(
|
349 |
-
"SELECT COUNT(`target`) as `count`, `target` as `url` FROM `$wpdb->statify` WHERE created
|
350 |
$current_date,
|
351 |
$days_show,
|
352 |
$limit
|
@@ -355,7 +355,7 @@ class Statify_Dashboard extends Statify {
|
|
355 |
);
|
356 |
$data['referrer'] = $wpdb->get_results(
|
357 |
$wpdb->prepare(
|
358 |
-
"SELECT COUNT(`referrer`) as `count`, `referrer` as `url`, SUBSTRING_INDEX(SUBSTRING_INDEX(TRIM(LEADING 'www.' FROM(TRIM(LEADING 'https://' FROM TRIM(LEADING 'http://' FROM TRIM(`referrer`))))), '/', 1), ':', 1) as `host` FROM `$wpdb->statify` WHERE `referrer` != '' AND created
|
359 |
$current_date,
|
360 |
$days_show,
|
361 |
$limit
|
346 |
} else {
|
347 |
$data['target'] = $wpdb->get_results(
|
348 |
$wpdb->prepare(
|
349 |
+
"SELECT COUNT(`target`) as `count`, `target` as `url` FROM `$wpdb->statify` WHERE created > DATE_SUB(%s, INTERVAL %d DAY) GROUP BY `target` ORDER BY `count` DESC LIMIT %d",
|
350 |
$current_date,
|
351 |
$days_show,
|
352 |
$limit
|
355 |
);
|
356 |
$data['referrer'] = $wpdb->get_results(
|
357 |
$wpdb->prepare(
|
358 |
+
"SELECT COUNT(`referrer`) as `count`, `referrer` as `url`, SUBSTRING_INDEX(SUBSTRING_INDEX(TRIM(LEADING 'www.' FROM(TRIM(LEADING 'https://' FROM TRIM(LEADING 'http://' FROM TRIM(`referrer`))))), '/', 1), ':', 1) as `host` FROM `$wpdb->statify` WHERE `referrer` != '' AND created > DATE_SUB(%s, INTERVAL %d DAY) GROUP BY `host` ORDER BY `count` DESC LIMIT %d",
|
359 |
$current_date,
|
360 |
$days_show,
|
361 |
$limit
|
inc/class-statify-frontend.php
CHANGED
@@ -331,8 +331,7 @@ class Statify_Frontend extends Statify {
|
|
331 |
|
332 |
if ( $is_snippet ) {
|
333 |
nocache_headers();
|
334 |
-
|
335 |
-
exit;
|
336 |
}
|
337 |
|
338 |
return false;
|
331 |
|
332 |
if ( $is_snippet ) {
|
333 |
nocache_headers();
|
334 |
+
wp_die( '', '', 204 );
|
|
|
335 |
}
|
336 |
|
337 |
return false;
|
inc/class-statify.php
CHANGED
@@ -79,9 +79,7 @@ class Statify {
|
|
79 |
|
80 |
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
81 |
add_action( 'wp_ajax_nopriv_statify_track', array( 'Statify_Frontend', 'track_visit_ajax' ) );
|
82 |
-
|
83 |
-
add_action( 'wp_ajax_statify_track', array( 'Statify_Frontend', 'track_visit_ajax' ) );
|
84 |
-
}
|
85 |
} elseif ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) { // XMLRPC.
|
86 |
add_filter( 'xmlrpc_methods', array( 'Statify_XMLRPC', 'xmlrpc_methods' ) );
|
87 |
} elseif ( defined( 'DOING_CRON' ) && DOING_CRON ) { // Cron.
|
79 |
|
80 |
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
81 |
add_action( 'wp_ajax_nopriv_statify_track', array( 'Statify_Frontend', 'track_visit_ajax' ) );
|
82 |
+
add_action( 'wp_ajax_statify_track', array( 'Statify_Frontend', 'track_visit_ajax' ) );
|
|
|
|
|
83 |
} elseif ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) { // XMLRPC.
|
84 |
add_filter( 'xmlrpc_methods', array( 'Statify_XMLRPC', 'xmlrpc_methods' ) );
|
85 |
} elseif ( defined( 'DOING_CRON' ) && DOING_CRON ) { // Cron.
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Requires at least: 4.7
|
6 |
* Tested up to: 5.4
|
7 |
* Requires PHP: 5.2
|
8 |
-
* Stable tag: 1.7.
|
9 |
* License: GPLv3 or later
|
10 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -115,6 +115,11 @@ has to be added to the theme's `functions.php`. The condition has modified such
|
|
115 |
## Changelog ##
|
116 |
You can find the full changelog in [our GitHub repository](https://github.com/pluginkollektiv/statify/blob/master/CHANGELOG.md).
|
117 |
|
|
|
|
|
|
|
|
|
|
|
118 |
### 1.7.1
|
119 |
* Fix refresh of the dashboard widget when settings have been changed through the settings page (#147)
|
120 |
* Fix _Cachify_ cache not being flushed after changing JavaScript settings (#152)
|
@@ -138,34 +143,14 @@ You can find the full changelog in [our GitHub repository](https://github.com/pl
|
|
138 |
* Skip tracking for favicon.ico redirects (since WP 5.4) (#144)
|
139 |
* Tested up to WordPress 5.4
|
140 |
|
141 |
-
### 1.6.3
|
142 |
-
* Fix compatibility issue with some PHP implementations not populating `INPUT_SERVER`
|
143 |
-
* Fix failing blacklist check for empty referrers
|
144 |
-
* JS snippet call properly breaks page generation when tracking is skipped
|
145 |
-
|
146 |
-
### 1.6.2
|
147 |
-
* Fix compatibility issues with JavaScript optimization plugins
|
148 |
-
* Fix tracking issue if JavaScript tracking is disabled
|
149 |
-
|
150 |
-
### 1.6.1
|
151 |
-
* Scaled datapoint size to number of records in dashboard widget to improve legibility
|
152 |
-
* Fix display of larger numbers in the y-axis
|
153 |
-
* Added JS source maps to avoid warnings with developer tools
|
154 |
-
* Move JS snippet to separate file
|
155 |
-
* Add JS snippet to output even if tracking is skipped to avoid caching problems
|
156 |
-
* Improve code style
|
157 |
-
* Enable nonce-verification in dashboard widget to prevent CSRF
|
158 |
-
|
159 |
-
### 1.6.0
|
160 |
-
* Added hook statify__visit_saved which is fired after a visit was stored in the database.
|
161 |
-
* Migrated dashboard chart to Chartist.
|
162 |
-
* Fixed JavaScript tracking not working in some environment which have X-Content-Type: nosniff environment enabled.
|
163 |
-
|
164 |
For the complete changelog, check out our [GitHub repository](https://github.com/pluginkollektiv/statify).
|
165 |
|
166 |
|
167 |
## Upgrade Notice ##
|
168 |
|
|
|
|
|
|
|
169 |
### 1.7.1 ###
|
170 |
This release fixes some bugs introduced with version 1.7.0. It is recommended for all users.
|
171 |
|
5 |
* Requires at least: 4.7
|
6 |
* Tested up to: 5.4
|
7 |
* Requires PHP: 5.2
|
8 |
+
* Stable tag: 1.7.2
|
9 |
* License: GPLv3 or later
|
10 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
115 |
## Changelog ##
|
116 |
You can find the full changelog in [our GitHub repository](https://github.com/pluginkollektiv/statify/blob/master/CHANGELOG.md).
|
117 |
|
118 |
+
## 1.7.2
|
119 |
+
* Prevent JavaScript tracking from raising 400 for logged-in users, if tracking is disabled (#159)
|
120 |
+
* Use `wp_die()` instead of header and exit for AJAX requests (#160)
|
121 |
+
* Fix 1 day offset between display range and number of days evaluated in top lists (#162)
|
122 |
+
|
123 |
### 1.7.1
|
124 |
* Fix refresh of the dashboard widget when settings have been changed through the settings page (#147)
|
125 |
* Fix _Cachify_ cache not being flushed after changing JavaScript settings (#152)
|
143 |
* Skip tracking for favicon.ico redirects (since WP 5.4) (#144)
|
144 |
* Tested up to WordPress 5.4
|
145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
For the complete changelog, check out our [GitHub repository](https://github.com/pluginkollektiv/statify).
|
147 |
|
148 |
|
149 |
## Upgrade Notice ##
|
150 |
|
151 |
+
### 1.7.2 ###
|
152 |
+
This release fixes some bugs. It is recommended for all users.
|
153 |
+
|
154 |
### 1.7.1 ###
|
155 |
This release fixes some bugs introduced with version 1.7.0. It is recommended for all users.
|
156 |
|
statify.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* Author URI: https://pluginkollektiv.org
|
8 |
* Plugin URI: https://wordpress.org/plugins/statify/
|
9 |
* License: GPLv3 or later
|
10 |
-
* Version: 1.7.
|
11 |
*
|
12 |
* @package WordPress
|
13 |
*/
|
@@ -20,7 +20,7 @@ defined( 'ABSPATH' ) || exit;
|
|
20 |
define( 'STATIFY_FILE', __FILE__ );
|
21 |
define( 'STATIFY_DIR', dirname( __FILE__ ) );
|
22 |
define( 'STATIFY_BASE', plugin_basename( __FILE__ ) );
|
23 |
-
define( 'STATIFY_VERSION', '1.7.
|
24 |
|
25 |
|
26 |
/* Hooks */
|
7 |
* Author URI: https://pluginkollektiv.org
|
8 |
* Plugin URI: https://wordpress.org/plugins/statify/
|
9 |
* License: GPLv3 or later
|
10 |
+
* Version: 1.7.2
|
11 |
*
|
12 |
* @package WordPress
|
13 |
*/
|
20 |
define( 'STATIFY_FILE', __FILE__ );
|
21 |
define( 'STATIFY_DIR', dirname( __FILE__ ) );
|
22 |
define( 'STATIFY_BASE', plugin_basename( __FILE__ ) );
|
23 |
+
define( 'STATIFY_VERSION', '1.7.2' );
|
24 |
|
25 |
|
26 |
/* Hooks */
|