pre_get_search_form

動作鉤子
do_action( 'pre_get_search_form', $args )
引數
  • (array) $args The array of arguments for building the search form. See get_search_form() for information on accepted arguments.
    Required:
定義位置
相關勾子
get_search_formpre_user_searchpre_get_termsget_search_querydelete_user_form
相關方法
get_search_formget_search_queryinstall_search_formwp_widget_rss_formrest_get_serverget_search_link
引入
5.5.0
棄用
-

pre_get_search_form – 這個鉤子在檢索搜尋表單HTML之前被呼叫。開發人員可以使用這個鉤子來修改搜尋表單或提供一個自定義的搜尋表單。

在檢索搜尋表單之前,在get_search_form()的開頭觸發。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( 'pre_get_search_form', $args );
do_action( 'pre_get_search_form', $args );
do_action( 'pre_get_search_form', $args );

常見問題

FAQs
檢視更多 >