WordPress.org

Make WordPress Core

Ticket #23850: 23850.5.patch

File 23850.5.patch, 1.9 KB (added by obenland, 5 years ago)

Like .4 but looking for 'search-form' support instead of 'search'

  • wp-includes/general-template.php

     
    155155function get_search_form( $echo = true ) {
    156156        do_action( 'pre_get_search_form' );
    157157
    158         $format = ( current_theme_supports( 'html5-search-form' ) ) ? 'html5' : 'xhtml';
     158        $format = ( current_theme_supports( 'html5', 'search-form' ) ) ? 'html5' : 'xhtml';
    159159        $format = apply_filters( 'search_form_format', $format );
    160160
    161161        $search_form_template = locate_template( 'searchform.php' );
  • wp-includes/comment-template.php

     
    15061506                'avatar_size'       => 32,
    15071507                'reverse_top_level' => null,
    15081508                'reverse_children'  => '',
    1509                 'format'            => 'xhtml', // or html5
     1509                'format'            => ( current_theme_supports( 'html5', 'comment-list' ) ) ? 'html5' : 'xhtml',
    15101510                'short_ping'        => false,
    15111511        );
    15121512
     
    16081608        $user = wp_get_current_user();
    16091609        $user_identity = $user->exists() ? $user->display_name : '';
    16101610
     1611        if ( ! isset( $args['format'] ) )
     1612                $args['format'] = ( current_theme_supports( 'html5', 'comment-form' ) ) ? 'html5' : 'xhtml';
     1613
    16111614        $req      = get_option( 'require_name_email' );
    16121615        $aria_req = ( $req ? " aria-required='true'" : '' );
    1613         $html5    = isset( $args['format'] ) && 'html5' === $args['format'];
     1616        $html5    = 'html5' === $args['format'];
    16141617        $fields   =  array(
    16151618                'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
    16161619                            '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>',