Allow to switch get_search_form() to HTML5 with an add_theme_support() call. fixes #23850.

git-svn-id: https://develop.svn.wordpress.org/trunk@24225 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2013-05-09 22:41:30 +00:00
parent 0ac97e433c
commit aaec6a462a
1 changed files with 2 additions and 1 deletions

View File

@ -155,7 +155,8 @@ function get_template_part( $slug, $name = null ) {
function get_search_form( $echo = true ) {
do_action( 'pre_get_search_form' );
$format = apply_filters( 'search_form_format', 'xhtml' );
$format = ( current_theme_supports( 'html5-search-form' ) ) ? 'html5' : 'xhtml';
$format = apply_filters( 'search_form_format', $format );
$search_form_template = locate_template( 'searchform.php' );
if ( '' != $search_form_template ) {