WordPress.org

Make WordPress Core

Ticket #23870: 23870.patch

File 23870.patch, 2.3 KB (added by SergeyBiryukov, 13 months ago)
  • wp-includes/comment-template.php

     
    16101610 
    16111611        $req      = get_option( 'require_name_email' ); 
    16121612        $aria_req = ( $req ? " aria-required='true'" : '' ); 
     1613        $req_mark = apply_filters( 'comment_form_required_field_mark', '*' ); 
    16131614        $html5    = isset( $args['format'] ) && 'html5' === $args['format']; 
    16141615        $fields   =  array( 
    1615                 'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . 
     1616                'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">' . $req_mark . '</span>' : '' ) . '</label> ' . 
    16161617                            '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>', 
    1617                 'email'  => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . 
     1618                'email'  => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . ( $req ? ' <span class="required">' . $req_mark . '</span>' : '' ) . '</label> ' . 
    16181619                            '<input id="email" name="email" ' . ( $html5 ? 'type="email" pattern=""' : 'type="text"' ) . ' value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>', 
    16191620                'url'    => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label>' . 
    16201621                            '<input id="url" name="url" ' . ( $html5 ? 'type="url" pattern=""' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>', 
    16211622        ); 
    16221623 
    1623         $required_text = sprintf( ' ' . __('Required fields are marked %s'), '<span class="required">*</span>' ); 
     1624        $required_text = sprintf( ' ' . __( 'Required fields are marked %s' ), '<span class="required">' . $req_mark . '</span>' ); 
    16241625        $defaults = array( 
    16251626                'fields'               => apply_filters( 'comment_form_default_fields', $fields ), 
    16261627                'comment_field'        => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',