Skip to content

Instantly share code, notes, and snippets.

@zackkatz
Created February 3, 2015 19:51
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 zackkatz/145b23adf02474bbeb2f to your computer and use it in GitHub Desktop.
Save zackkatz/145b23adf02474bbeb2f to your computer and use it in GitHub Desktop.
Force searches to match all parameters, not any.
<?php
/**
* Force searches to match all parameters, not any.
*
* @link http://docs.gravityview.co/article/55-how-do-i-modify-the-search-mode
* @param string $mode 'any' or 'all'
*/
function gv_my_modify_search_mode ( $mode ) {
return 'all'; // by default is 'any'
}
add_filter( 'gravityview/search/mode', 'gv_my_modify_search_mode', 10, 1 );
@zackkatz
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment