The search_form_format filter allows changing the search box from 'xhtml' to 'html5' and vice versa.
When the 'search_form_format' filter is called, it is passed one parameter: a string of the format ( html5 or xhtml )
add_filter( 'search_form_format', 'filter_function_name', 10 ); function filter_function_name( $format ) { // Alter format return $format; }
Where 'filter_function_name' is the function WordPress should call when filter is run. Note that the filter function must return an value after it is finished processing or the search form will be empty.
filter_function_name should be unique function name. It cannot match any other function name already declared.
add_filter( 'search_form_format', 'filter_function_name', 10 ); function filter_function_name( $format ) { return 'html5'; }