CARVIEW |
Select Language
HTTP/2 200
server: nginx
date: Thu, 09 Oct 2025 08:48:49 GMT
content-type: text/html;charset=utf-8
vary: Accept-Encoding
etag: W/"anonymous/Tue, 16 Feb 2010 04:30:28 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
10910.005.diff on Ticket #10910 – Attachment
– WordPress Trac
Ticket #10910: 10910.005.diff
File 10910.005.diff, 8.3 KB (added by beaulebens, 16 years ago) |
---|
The attached patch takes a swing at fixing the semanticness of the comment_form output, based largely on Otto42's patch. Also includes all the CSS modifications required for 2010 to look the same as it does currently with the new defaults form output. |
-
wp-includes/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>',1468 $defaults = array( 'fields' => apply_filters( 'comment_form_default_fields', array( 'author' => '<p class="comment-form-author">' . 1469 '<label for="author">' . __( 'Name' ) . '</label> ' . 1470 ( $req ? '<span class="required">*</span>' : '' ) . 1471 '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" tabindex="1"' . $aria_req . ' />' . 1472 '</p><!-- #form-section-author .form-section -->', 1473 'email' => '<p class="comment-form-email">' . 1474 '<label for="email">' . __( 'Email' ) . '</label> ' . 1475 ( $req ? '<span class="required">*</span>' : '' ) . 1476 '<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" tabindex="2"' . $aria_req . ' />' . 1477 '</p><!-- #form-section-email .form-section -->', 1478 'url' => '<p class="comment-form-url">' . 1479 '<label for="url">' . __( 'Website' ) . '</label>' . 1480 '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" tabindex="3" />' . 1481 '</p><!-- #form-section-url .form-section -->' ) ), 1482 'comment_field' => '<p class="comment-form-comment">' . 1483 '<label for="comment">' . __( 'Comment' ) . '</label>' . 1484 '<textarea id="comment" name="comment" cols="45" rows="8" tabindex="4" aria-required="true"></textarea>' . 1485 '</p><!-- #form-section-comment .form-section -->', 1486 'must_log_in' => '<p class="must-log-in">' . 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>', 1487 'logged_in_as' => '<p class="logged-in-as">' . 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 ) ) ) ), 1488 'comment_notes_before' => '<p class="comment-notes">' . __( 'Your email is <em>never</em> published nor shared.' ) . ( $req ? __( ' Required fields are marked <span class="required">*</span>' ) : '' ) . '</p>', 1489 'comment_notes_after' => '<dl class="form-allowed-tags"><dt>' . __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:' ) . '</dt> <dd><code>' . allowed_tags() . '</code></dd></dl>', 1490 1490 'id_form' => 'commentform', 1491 1491 'id_submit' => 'submit', 1492 1492 'title_reply' => __( 'Leave a Reply' ), 1493 'title_reply_to' => __( 'Leave a Reply to %s' ),1493 'title_reply_to' => __( 'Leave a Reply to %s' ), 1494 1494 'cancel_reply_link' => __( 'Cancel reply' ), 1495 1495 'label_submit' => __( 'Post Comment' ), 1496 1496 ); … … 1522 1522 <?php endif; ?> 1523 1523 <?php echo apply_filters( 'comment_form_field_comment', $args['comment_field'] ); ?> 1524 1524 <?php echo $args['comment_notes_after']; ?> 1525 < divclass="form-submit">1525 <p class="form-submit"> 1526 1526 <input name="submit" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" tabindex="<?php echo ( count( $args['fields'] ) + 2 ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" /> 1527 1527 <?php comment_id_fields(); ?> 1528 </ div>1528 </p> 1529 1529 <?php do_action( 'comment_form', $post_id ); ?> 1530 1530 </form> 1531 1531 <?php endif; ?> -
wp-content/themes/twentyten/style.css
104 104 h3#reply-title, 105 105 #access .menu, 106 106 #cancel-comment-reply-link, 107 #form-allowed-tags,107 .form-allowed-tags, 108 108 #site-info, 109 109 #site-title, 110 110 #wp-calendar, … … 117 117 .entry-meta, 118 118 .entry-title, 119 119 .entry-utility, 120 .form-label,120 #respond label, 121 121 .navigation, 122 122 .page-title, 123 123 .pingback p, … … 962 962 overflow: hidden; 963 963 position: relative; 964 964 } 965 #respond p { 966 margin: 0; 967 } 968 #respond .comment-notes { 969 margin-bottom: 1em; 970 } 965 971 .children #respond { 966 972 margin: 0 48px 0 0; 967 973 } … … 983 989 color:#FF4B33; 984 990 font-weight:bold; 985 991 } 986 .form-sectionlabel {992 #respond label { 987 993 color: #888; 988 994 font-size: 12px; 989 995 } 990 .form-sectioninput {996 #respond input { 991 997 margin:0 0 9px 0; 992 998 width:98%; 993 999 } 994 .form-sectiontextarea {1000 #respond textarea { 995 1001 width:99%; 996 1002 } 997 #form-allowed-tags { 998 color:#888; 1003 #respond dt, 1004 #respond dd { 1005 color: #888; 999 1006 font-size: 12px; 1000 1007 line-height: 18px; 1001 1008 } 1002 # form-allowed-tags p{1003 margin:0;1009 #respond dd code { 1010 font-size: 11px; 1004 1011 } 1005 #form-allowed-tags span { 1012 #respond .form-submit { 1013 margin: 0 0 24px; 1006 1014 } 1007 # form-allowed-tags code{1008 font-size: 11px;1015 #respond .form-submit input { 1016 width: auto; 1009 1017 } 1010 .form-submit{1011 margin: 12px 0 24px 0;1018 #respond dl { 1019 margin: 0 0 10px; 1012 1020 } 1021 #respond dt { 1022 display: inline; 1023 font-weight: normal; 1024 } 1025 #respond dd { 1026 display: inline; 1027 } 1013 1028 1014 1029 1015 1030