pre_get_search_form
Fires before the search form is retrieved, at the start of get_search_form().
Использование
add_action( 'pre_get_search_form', 'wp_kama_pre_get_search_form_action' ); /** * Function for `pre_get_search_form` action-hook. * * @param array $args The array of arguments for building the search form. See get_search_form() for information on accepted arguments. * * @return void */ function wp_kama_pre_get_search_form_action( $args ){ // action... }
- $args(массив)
- The array of arguments for building the search form. See get_search_form() for information on accepted arguments.
Список изменений
С версии 3.6.0 | Введена. |
С версии 2.7.0 | as get_search_form |
С версии 5.5.0 | The $args parameter was added. |
Где вызывается хук
wp-includes/general-template.php 254
do_action( 'pre_get_search_form', $args );