search_form_format
Filters the HTML format of the search form.
Использование
add_filter( 'search_form_format', 'wp_kama_search_form_format_filter', 10, 2 ); /** * Function for `search_form_format` filter-hook. * * @param string $format The type of markup to use in the search form. Accepts 'html5', 'xhtml'. * @param array $args The array of arguments for building the search form. See get_search_form() for information on accepted arguments. * * @return string */ function wp_kama_search_form_format_filter( $format, $args ){ // filter... return $format; }
- $format(строка)
- The type of markup to use in the search form. Accepts 'html5', 'xhtml'.
- $args(массив)
- The array of arguments for building the search form. See get_search_form() for information on accepted arguments.
Список изменений
С версии 3.6.0 | Введена. |
С версии 5.5.0 | The $args parameter was added. |
Где вызывается хук
wp-includes/general-template.php 304
$format = apply_filters( 'search_form_format', $format, $args );