From c7c0f9e34654aaa2b62e06b2504222b608873624 Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Sun, 16 Jul 2017 14:14:25 +0200 Subject: [PATCH] Fix filter hook if referer is disabled (#9) The filter was only appended, if the referer live filter is set active. Now the condition checks for any available blacklist. --- inc/class-statifyblacklist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/class-statifyblacklist.php b/inc/class-statifyblacklist.php index 3b2a7b2..879b554 100644 --- a/inc/class-statifyblacklist.php +++ b/inc/class-statifyblacklist.php @@ -69,7 +69,7 @@ class StatifyBlacklist { self::$multisite = ( is_multisite() && array_key_exists( STATIFYBLACKLIST_BASE, (array) get_site_option( 'active_sitewide_plugins' ) ) ); // Add Filter to statify hook if enabled. - if ( 0 !== self::$_options['referer']['active'] ) { + if ( 0 !== self::$_options['referer']['active'] || 0 !== self::$_options['target']['active'] || 0 !== self::$_options['ip']['active'] ) { add_filter( 'statify__skip_tracking', array( 'StatifyBlacklist', 'apply_blacklist_filter' ) ); }