Changeset 13030
- Timestamp:
- 02/08/2010 08:54:29 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment-template.php
r13028 r13030 1466 1466 $req = get_option( 'require_name_email' ); 1467 1467 $aria_req = ( $req ? " aria-required='true'" : '' ); 1468 $req_str = ( $req ? __( ' (required)' ) : '' ); 1469 $defaults = array( 'fields' => apply_filters( 'comment_form_default_fields', array( 'author' => '<p><input type="text" name="author" id="author" value="' . esc_attr( $commenter['comment_author'] ) . '" size="22" tabindex="1"' . $aria_req . ' /> <label for="author"><small>' . __( 'Name' ) . $req_str . '</small></label></p>', 1470 'email' => '<p><input type="text" name="email" id="email" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="22" tabindex="2"' . $aria_req . ' /> <label for="email"><small>' . __( 'Mail (will not be published)' ) . $req_str . '</small></label></p>', 1471 'url' => '<p><input type="text" name="url" id="url" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="22" tabindex="3" /> <label for="url"><small>' . __( 'Website' ) . '</small></label></p>' ) ), 1472 'comment_field' => '<p><textarea name="comment" id="comment" cols="58" rows="10" tabindex="4"></textarea></p>', 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 -->', 1473 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>', 1474 '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 ) ) ) ), 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>', 1475 1490 'id_form' => 'commentform', 1476 1491 'id_submit' => 'submit', 1477 1492 'title_reply' => __( 'Leave a Reply' ), 1478 1493 'title_reply_to' => __( 'Leave a Reply to %s'), 1479 'cancel_reply_link' => '',1480 'label_submit' => __( ' Submit Comment' ),1494 'cancel_reply_link' => __( 'Cancel reply' ), 1495 'label_submit' => __( 'Post Comment' ), 1481 1496 ); 1482 1497 $args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) ); … … 1486 1501 <?php do_action( 'comment_form_before' ); ?> 1487 1502 <div id="respond"> 1488 <h3><?php comment_form_title( $args['title_reply'], $args['title_reply_to'] ); ?></h3> 1489 <div class="cancel-comment-reply"> 1490 <small><?php cancel_comment_reply_link( $args['cancel_comment_reply_link'] ); ?></small> 1491 </div> 1503 <h3 id="reply-title"><?php comment_form_title( $args['title_reply'], $args['title_reply_to'] ); ?> <small><?php cancel_comment_reply_link( $args['cancel_reply_link'] ); ?></small></h3> 1492 1504 <?php if ( get_option( 'comment_registration' ) && !is_user_logged_in() ) : ?> 1493 1505 <?php echo $args['must_log_in']; ?> … … 1500 1512 <?php do_action( 'comment_form_logged_in_after', $commenter, $user_identity ); ?> 1501 1513 <?php else : ?> 1514 <?php echo $args['comment_notes_before']; ?> 1502 1515 <?php 1503 1516 do_action( 'comment_form_before_fields' ); … … 1509 1522 <?php endif; ?> 1510 1523 <?php echo apply_filters( 'comment_form_field_comment', $args['comment_field'] ); ?> 1511 <p> 1524 <?php echo $args['comment_notes_after']; ?> 1525 <div class="form-submit"> 1512 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'] ); ?>" /> 1513 1527 <?php comment_id_fields(); ?> 1514 </ p>1528 </div> 1515 1529 <?php do_action( 'comment_form', $post_id ); ?> 1516 1530 </form>
Note: See TracChangeset
for help on using the changeset viewer.