-
-
Save searchwpgists/4ace6195f4c5d3eaedd39370e88ead55 to your computer and use it in GitHub Desktop.
Disable SearchWP's logging of searches for anyone who is logged in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Disable SearchWP's logging of searches for anyone who is logged in. | |
add_filter( 'searchwp\statistics\log', function( $enabled, $query ) { | |
return ! is_user_logged_in(); | |
}, 20, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment