pre_get_search_form хук-событиеWP 3.6.0

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.

Где вызывается хук

get_search_form()
pre_get_search_form
wp-includes/general-template.php 254
do_action( 'pre_get_search_form', $args );

Где используется хук в WordPress

Использование не найдено.