Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Last active May 6, 2019 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchristopher/7862503 to your computer and use it in GitHub Desktop.
Save jchristopher/7862503 to your computer and use it in GitHub Desktop.
Modify the SearchWP search terms after all sanitization has taken place
<?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