Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created December 8, 2013 01:58
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/7852448 to your computer and use it in GitHub Desktop.
Save jchristopher/7852448 to your computer and use it in GitHub Desktop.
Control whether SearchWP applies it's own term sanitization
<?php
function my_searchwp_sanitize_terms( $enabled, $engine )
{
if( $engine == 'default' ) {
// if it's the default engine, use SearchWP's sanitizing
return true;
} else {
// for supplemental engines disable automatic sanitization
return false;
}
}
add_filter( 'searchwp_sanitize_terms', 'my_searchwp_sanitize_terms', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment