search_form_format filter-hookWP 3.6.0

Filters the HTML format of the search form.

Usage

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(string)
The type of markup to use in the search form. Accepts 'html5', 'xhtml'.
$args(array)
The array of arguments for building the search form. See get_search_form() for information on accepted arguments.

Changelog

Since 3.6.0 Introduced.
Since 5.5.0 The $args parameter was added.

Where the hook is called

get_search_form()
search_form_format
wp-includes/general-template.php 304
$format = apply_filters( 'search_form_format', $format, $args );

Where the hook is used in WordPress

Usage not found.