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.


Top ↑

Source

File: wp-admin/includes/ajax-actions.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More