Created
December 8, 2013 01:58
-
-
Save jchristopher/7852448 to your computer and use it in GitHub Desktop.
Control whether SearchWP applies it's own term sanitization
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_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