Ticket #15080: 15080.5.diff
File 15080.5.diff, 2.9 KB (added by , 12 years ago) |
---|
-
wp-includes/comment-template.php
1518 1518 $user = wp_get_current_user(); 1519 1519 $user_identity = $user->exists() ? $user->display_name : ''; 1520 1520 1521 $req = get_option( 'require_name_email' );1521 $req = get_option( 'require_name_email' ); 1522 1522 $aria_req = ( $req ? " aria-required='true'" : '' ); 1523 $fields = array( 1523 $html5 = isset( $args['format'] ) && 'html5' === $args['format']; 1524 $fields = array( 1524 1525 'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . 1525 1526 '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>', 1526 1527 'email' => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . 1527 '<input id="email" name="email" type="text"value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>',1528 '<input id="email" name="email" ' . ( $html5 ? 'type="email" pattern=""' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>', 1528 1529 'url' => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label>' . 1529 '<input id="url" name="url" type="text"value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>',1530 '<input id="url" name="url" ' . ( $html5 ? 'type="url" pattern=""' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>', 1530 1531 ); 1531 1532 1532 1533 $required_text = sprintf( ' ' . __('Required fields are marked %s'), '<span class="required">*</span>' ); … … 1543 1544 'title_reply_to' => __( 'Leave a Reply to %s' ), 1544 1545 'cancel_reply_link' => __( 'Cancel reply' ), 1545 1546 'label_submit' => __( 'Post Comment' ), 1547 'format' => '', 1546 1548 ); 1547 1549 1548 1550 $args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) ); … … 1556 1558 <?php echo $args['must_log_in']; ?> 1557 1559 <?php do_action( 'comment_form_must_log_in_after' ); ?> 1558 1560 <?php else : ?> 1559 <form action="<?php echo site_url( '/wp-comments-post.php' ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>" >1561 <form action="<?php echo site_url( '/wp-comments-post.php' ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>"<?php echo $html5 ? ' novalidate' : ''; ?>> 1560 1562 <?php do_action( 'comment_form_top' ); ?> 1561 1563 <?php if ( is_user_logged_in() ) : ?> 1562 1564 <?php echo apply_filters( 'comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity ); ?>