Skip to content

Instantly share code, notes, and snippets.

@jchristopher jchristopher/functions.php Secret
Created Jul 17, 2018

Embed
What would you like to do?
<?php
// Customize whether Metrics logs this search
add_filter( 'searchwp_metrics_log_search', function( $log, $engine, $query, $hits ) {
// $log is whether or not to log the search
// $engine is the engine being used for the search
// $query is the search query
// $hits is the number of results found for this search
return $log;
}, 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.