get_search_form
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
wp-includes/general-template.php 359
$result = apply_filters( 'get_search_form', $form, $args );