Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.