CARVIEW |
Select Language
HTTP/2 200
server: nginx
date: Fri, 10 Oct 2025 03:47:29 GMT
content-type: text/html;charset=utf-8
vary: Accept-Encoding
etag: W/"anonymous/Wed, 10 Feb 2010 21:07:19 GMT/False"
cache-control: must-revalidate
expires: Fri, 01 Jan 1999 00:00:00 GMT
alt-svc: h3=":443"; ma=86400
strict-transport-security: max-age=31536000
x-frame-options: SAMEORIGIN
content-encoding: gzip
example.diff on Ticket #10910 – Attachment
– WordPress Trac
Ticket #10910: example.diff
File example.diff, 6.1 KB (added by Otto42, 16 years ago) |
---|
Example of the right way to do semantic markup |
-
comment-template.php
1465 1465 1466 1466 $req = get_option( 'require_name_email' ); 1467 1467 $aria_req = ( $req ? " aria-required='true'" : '' ); 1468 $defaults = array( 'fields' => apply_filters( 'comment_form_default_fields', array( 'author' => '<div id="form-section-author" class="form-section"> 1469 <div class="form-label"><label for="author">' . __( 'Name', 'twentyten' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) . '</div> 1470 <div class="form-input"><input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" tabindex="1"' . $aria_req . ' /></div> 1471 </div><!-- #form-section-author .form-section -->', 1472 'email' => '<div id="form-section-email" class="form-section"> 1473 <div class="form-label"><label for="email">' . __( 'Email', 'twentyten' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) . '</div> 1474 <div class="form-input"><input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" tabindex="2"' . $aria_req . ' /></div> 1475 </div><!-- #form-section-email .form-section -->', 1476 'url' => '<div id="form-section-url" class="form-section"> 1477 <div class="form-label"><label for="url">' . __( 'Website', 'twentyten' ) . '</label></div> 1478 <div class="form-input"><input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" tabindex="3" /></div> 1479 </div><!-- #form-section-url .form-section -->' ) ), 1480 'comment_field' => '<div id="form-section-comment" class="form-section"> 1481 <div class="form-label"><label for="comment">' . __( 'Comment', 'twentyten' ) . '</label></div> 1482 <div class="form-textarea"><textarea id="comment" name="comment" cols="45" rows="8" tabindex="4" aria-required="true"></textarea></div> 1483 </div><!-- #form-section-comment .form-section -->', 1484 'must_log_in' => '<p>' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>', 1485 'logged_in_as' => '<p>' . sprintf( __( 'Logged in as <a href="%s">%s</a>. <a href="%s" title="Log out of this account">Log out?</a></p>' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ), 1486 'comment_notes_before' => '<p id="comment-notes">' . __( 'Your email is <em>never</em> published nor shared.' ) . ( $req ? __( ' Required fields are marked <span class="required">*</span>' ) : '' ) . '</p>', 1487 'comment_notes_after' => '<div id="form-allowed-tags" class="form-section"> 1488 <p><span>' . __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:' ) . '</span> <code>' . allowed_tags() . '</code></p> 1489 </div>', 1490 'id_form' => 'commentform', 1491 'id_submit' => 'submit', 1492 'title_reply' => __( 'Leave a Reply' ), 1493 'title_reply_to' => __( 'Leave a Reply to %s'), 1494 'cancel_reply_link' => __( 'Cancel reply' ), 1495 'label_submit' => __( 'Post Comment' ), 1468 $defaults = array( 1469 'fields' => apply_filters( 'comment_form_default_fields', array( 1470 'author' => 1471 '<p class="comment-form-author">'. 1472 '<label for="author">' . __( 'Name' ) . '</label> ' . 1473 ( $req ? '<span class="required">*</span>' : '' ) . 1474 '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" tabindex="1"' . $aria_req . ' />'. 1475 '</p>', 1476 'email' => 1477 '<p class="comment-form-email">'. 1478 '<label for="email">' . __( 'Email' ) . '</label> ' . 1479 ( $req ? '<span class="required">*</span>' : '' ) . 1480 '<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" tabindex="2"' . $aria_req . ' />'. 1481 '</p>', 1482 'url' => 1483 '<p class="comment-form-url">'. 1484 '<label for="url">' . __( 'Website' ) . '</label> ' . 1485 '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" tabindex="3" />'. 1486 '</p>' 1487 ) 1488 ), 1489 'comment_form_before_fields' => '<div class="comment-fields">'; 1490 'comment_form_after_fields' => '</div>'; 1491 'comment_field' => 1492 '<div class="comment-form-comment">'. 1493 '<label for="comment">' . __( 'Comment' ) . '</label></div>'. 1494 '<textarea id="comment" name="comment" cols="45" rows="8" tabindex="4" aria-required="true"></textarea></div>'. 1495 '</div>', 1496 'must_log_in' => '<p>' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>', 1497 'logged_in_as' => '<p>' . sprintf( __( 'Logged in as <a href="%s">%s</a>. <a href="%s" title="Log out of this account">Log out?</a></p>' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ), 1498 'comment_notes_before' => '<p id="comment-notes">' . __( 'Your email is <em>never</em> published nor shared.' ) . ( $req ? __( ' Required fields are marked <span class="required">*</span>' ) : '' ) . '</p>', 1499 'comment_notes_after' => 1500 '<div class="comment-form-allowed-tags">'. 1501 '<p><span>' . __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:' ) . '</span> <code>' . allowed_tags() . '</code></p>'. 1502 '</div>', 1503 'id_form' => 'commentform', 1504 'id_submit' => 'submit', 1505 'title_reply' => __( 'Leave a Reply' ), 1506 'title_reply_to' => __( 'Leave a Reply to %s'), 1507 'cancel_reply_link' => __( 'Cancel reply' ), 1508 'label_submit' => __( 'Post Comment' ), 1496 1509 ); 1497 1510 $args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) ); 1498 1511