term_search_min_chars filter-hookWP 4.0.0

Filters the minimum number of characters required to fire a tag search via Ajax.


add_filter( 'term_search_min_chars', 'wp_kama_term_search_min_chars_filter', 10, 3 );

 * Function for `term_search_min_chars` filter-hook.
 * @param int         $characters      The minimum number of characters required.
 * @param WP_Taxonomy $taxonomy_object The taxonomy object.
 * @param string      $search          The search term.
 * @return int
function wp_kama_term_search_min_chars_filter( $characters, $taxonomy_object, $search ){

	// filter...
	return $characters;
The minimum number of characters required.
Default: 2
The taxonomy object.
The search term.


Since 4.0.0 Introduced.

Where the hook is called

wp-admin/includes/ajax-actions.php 145
$term_search_min_chars = (int) apply_filters( 'term_search_min_chars', 2, $taxonomy_object, $search );

Where the hook is used in WordPress

Usage not found.