term_search_min_chars WordPress Filter Hook
The term_search_min_chars hook is used to set the minimum number of characters required for a search term. This hook can be used to ensure that a search term is not too short, and to improve search performance by avoiding searches for terms that are too short.
apply_filters( 'term_search_min_chars', int $characters , WP_Taxonomy $tax , string $s ) #
Filters the minimum number of characters required to fire a tag search via Ajax.
Parameters
- $characters
(int)The minimum number of characters required. Default 2.
- $tax
(WP_Taxonomy)The taxonomy object.
- $s
(string)The search term.
Source
Changelog
Version | Description |
---|---|
4.0.0 | Introduced. |