stklcode / statify-blacklist

Filter extension for the Statify WordPress plugin
https://wordpress.org/plugins/statify-blacklist/
GNU General Public License v2.0
2 stars 1 forks source link

Admin visits counted when using filter hook #6

Closed stklcode closed 7 years ago

stklcode commented 7 years ago

Reported on German WordPress support forums (https://wordpress.org/support/topic/seit-einsatz-des-plugin-werden-admin-besuche-mitgezahlt/):

When using the blacklist plugin, admin logings are tracked. Seems that statify's hook returns the filter value and does not continue with it's own filters after execution.

stklcode commented 7 years ago

Bug affects not only admin visits but disables built-in filters (useragent, logged-in, error pages, robots, ...) completely, because the filter hook returns the result of the hooked function. Doing so allows a hook to implement a whitelist, hence is should not be changed globally.

Returning null instead of false in die filter funciton enforces Statify to continue with _skip_tracking() instead of returning the result of our hook. Will be deployed with upcoming release 1.3.1