Changeset 12859 for trunk/wp-includes/comment-template.php
- Timestamp:
- 01/26/2010 10:49:05 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/comment-template.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment-template.php
r12821 r12859 41 41 * @since 0.71 42 42 * @uses apply_filters() Calls 'comment_author' on comment author before displaying 43 * 43 * 44 44 * @param int $comment_ID The ID of the comment for which to print the author. Optional. 45 45 */ … … 857 857 if ( empty($file) ) 858 858 $file = '/comments.php'; 859 859 860 860 $req = get_option('require_name_email'); 861 861 … … 1449 1449 * in the array of fields. 1450 1450 * 1451 * @since 3.0 1451 * @since 3.0 1452 1452 * @param array $args Options for strings, fields etc in the form 1453 1453 * @param mixed $post_id Post ID to generate the form for, uses the current post if null … … 1456 1456 function comment_form( $args = array(), $post_id = null ) { 1457 1457 global $user_identity, $id; 1458 1458 1459 1459 if ( null === $post_id ) 1460 1460 $post_id = $id; 1461 1461 else 1462 1462 $id = $post_id; 1463 1463 1464 1464 $commenter = wp_get_current_commenter(); 1465 1465 1466 1466 $req = get_option( 'require_name_email' ); 1467 1467 $aria_req = ( $req ? " aria-required='true'" : '' ); 1468 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>', 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 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>', 1473 '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 ) ) ) ), 1475 'id_form' => 'commentform', 1476 'id_submit' => 'submit', 1477 'title_reply' => __( 'Leave a Reply' ), 1478 'title_reply_to' => __( 'Leave a Reply to %s'), 1479 'cancel_reply_link' => '', 1480 'label_submit' => __( 'Submit Comment' ), 1472 'comment_field' => '<p><textarea name="comment" id="comment" cols="58" rows="10" tabindex="4"></textarea></p>', 1473 '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 ) ) ) ), 1475 'id_form' => 'commentform', 1476 'id_submit' => 'submit', 1477 'title_reply' => __( 'Leave a Reply' ), 1478 'title_reply_to' => __( 'Leave a Reply to %s'), 1479 'cancel_reply_link' => '', 1480 'label_submit' => __( 'Submit Comment' ), 1481 1481 ); 1482 1482 $args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) ); 1483 1483 1484 1484 ?> 1485 1485 <?php if ( comments_open() ) : ?>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)