WordPress.org

Make WordPress Core

Ticket #23850: 23850.2.diff

File 23850.2.diff, 630 bytes (added by SergeyBiryukov, 2 years ago)
  • wp-includes/general-template.php

     
    155155function get_search_form( $echo = true ) { 
    156156        do_action( 'pre_get_search_form' ); 
    157157 
    158         $format = apply_filters( 'search_form_format', 'xhtml' ); 
     158        $format = ( current_theme_supports( 'html5-search-form' ) ) ? 'html5' : 'xhtml'; 
     159        $format = apply_filters( 'search_form_format', $format ); 
    159160 
    160161        $search_form_template = locate_template( 'searchform.php' ); 
    161162        if ( '' != $search_form_template ) {