get_search_form filter-hookWP 2.7.0

Filters the HTML output of the search form.

Usage

add_filter( 'get_search_form', 'wp_kama_get_search_form_filter', 10, 2 );

/**
 * Function for `get_search_form` filter-hook.
 * 
 * @param string $form The search form HTML output.
 * @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_get_search_form_filter( $form, $args ){

	// filter...
	return $form;
}
$form(string)
The search form HTML output.
$args(array)
The array of arguments for building the search form. See get_search_form() for information on accepted arguments.

Changelog

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

Where the hook is called

get_search_form()
get_search_form
wp-includes/general-template.php 351
$result = apply_filters( 'get_search_form', $form, $args );

Where the hook is used in WordPress

Usage not found.