Last active
May 6, 2019 20:33
-
-
Save jchristopher/7862503 to your computer and use it in GitHub Desktop.
Modify the SearchWP search terms after all sanitization has taken place
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 | |
function my_searchwp_pre_search_terms( $terms, $engine ) { | |
if ( 'myengine' == $engine ) { | |
// do something with the terms | |
} | |
return $terms; | |
} | |
add_filter( 'searchwp_pre_search_terms', 'my_searchwp_pre_search_terms', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment