Skip to content

Instantly share code, notes, and snippets.

@ajaydsouza
Created December 26, 2015 21:06
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 ajaydsouza/f23f35704431485c6922 to your computer and use it in GitHub Desktop.
Save ajaydsouza/f23f35704431485c6922 to your computer and use it in GitHub Desktop.
Examples of using various filters in Better Search WordPress plugin
<?php
/**
* Filter to override the censor character in Better Search.
*
* @param string Default censor string
*
* @return string Censored string
*/
function filter_bsearch_censor_char( $censorChar ) {
return "*";
}
add_filter( 'bsearch_censor_char', 'filter_bsearch_censor_char' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment