Created
April 26, 2019 14:12
-
-
Save jchristopher/592def859283e6d2b2d234910172ec8a to your computer and use it in GitHub Desktop.
Prevent SearchWP from finding partial matches if an exact match is found
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 | |
// Prevent SearchWP from finding partial matches if an exact match is found. | |
add_filter( 'searchwp_partial_matches_lenient', function( $lenient, $args ) { | |
// $args['engine'] is the engine being used | |
return false; // true/false | |
}, 20, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment