term_search_min_chars

過濾鉤子
apply_filters( 'term_search_min_chars', 2, $taxonomy_object, $search )
引數
  • (int) $characters The minimum number of characters required. Default 2.
    Required:
  • (WP_Taxonomy) $taxonomy_object The taxonomy object.
    Required:
  • (string) $search The search term.
    Required:
定義位置
相關勾子
search_form_argsajax_term_search_resultssite_search_columnsrest_term_search_querywp_rest_search_handlers
相關方法
get_search_linkthe_search_querywp_specialcharsget_search_formget_search_templatepermalink_anchor
引入
4.0.0
棄用
-

term_search_min_chars 是一個過濾器,允許開發者修改WordPress管理區中術語搜尋所需的最小字元數。

過濾了通過Ajax啟動標籤搜尋所需的最小字元數。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$term_search_min_chars = (int) apply_filters( 'term_search_min_chars', 2, $taxonomy_object, $search );
$term_search_min_chars = (int) apply_filters( 'term_search_min_chars', 2, $taxonomy_object, $search );
$term_search_min_chars = (int) apply_filters( 'term_search_min_chars', 2, $taxonomy_object, $search );

常見問題

FAQs
檢視更多 >