2 Commits

Author SHA1 Message Date
2dd8e60bd8 prepare release 1.5.1 2020-05-20 10:33:05 +02:00
902e211552 postpone jump out on AJAX calls for Statify 1.7 compatibility (#22)
Statify 1.7 changed the JS tacking endpoint to WP AJAX, so we must not
skip the complete initialization on AJAX calls anymore. The routine now
breaks after adding the filter (if necessary).
2020-05-20 10:26:57 +02:00
6 changed files with 15 additions and 7 deletions

View File

@ -8,7 +8,7 @@
* Requires at least: 4.7
* Tested up to: 5.4
* Requires PHP: 5.5
* Stable tag: 1.5.0
* Stable tag: 1.5.1
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
@ -90,6 +90,9 @@ Same for IPv6 prefixes like _2001:db8:a0b:12f0::/64_.
## Changelog ##
### 1.5.1 / 20.05.2020 ###
* Fix initialization on AJAX calls for _Statify_ 1.7 compatibility (#22)
### 1.5.0 / 13.05.2020 ###
* Minimum required WordPress version is 4.7
* Removed `load_plugin_textdomain()` and `Domain Path` header

View File

@ -8,7 +8,7 @@
* @author Stefan Kalscheuer <stefan@stklcode.de>
*
* @package Statify_Blacklist
* @version 1.5.0
* @version 1.5.1
*/
use Robo\Exception\TaskException;

View File

@ -1,6 +1,6 @@
{
"name": "stklcode/statify-blacklist",
"version": "1.5.0",
"version": "1.5.1",
"description": "A blacklist extension for the famous Statify WordPress plugin",
"keywords": [
"wordpress",

View File

@ -81,8 +81,8 @@ class StatifyBlacklist {
* @return void
*/
public static function init() {
// Skip on autosave or AJAX.
if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
// Skip on autosave.
if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) ) {
return;
}
@ -97,6 +97,11 @@ class StatifyBlacklist {
add_filter( 'statify__skip_tracking', array( 'StatifyBlacklist', 'apply_blacklist_filter' ) );
}
// Statify uses WP AJAX as of 1.7, so we need to reach this point. But there are no further admin/cron actions.
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
return;
}
// Admin only filters.
if ( is_admin() ) {
StatifyBlacklist_Admin::init();

View File

@ -1,6 +1,6 @@
{
"name": "statify-blacklist",
"version": "1.5.0",
"version": "1.5.1",
"description": "A blacklist extension for the famous Statify WordPress plugin",
"author": "Stefan Kalscheuer",
"license": "GPL-2.0+"

View File

@ -10,7 +10,7 @@
* Plugin Name: Statify Blacklist
* Plugin URI: https://wordpress.org/plugins/statify-blacklist/
* Description: Extension for the Statify plugin to add a customizable blacklists.
* Version: 1.5.0
* Version: 1.5.1
* Author: Stefan Kalscheuer (@stklcode)
* Author URI: https://www.stklcode.de
* Text Domain: statify-blacklist