Ticket #20302: 20302-1.diff
File 20302-1.diff, 2.3 KB (added by , 13 years ago) |
---|
-
wp-includes/comment-template.php
1533 1533 $required_text = sprintf( ' ' . __('Required fields are marked %s'), '<span class="required">*</span>' ); 1534 1534 $defaults = array( 1535 1535 'fields' => apply_filters( 'comment_form_default_fields', $fields ), 1536 'form_attributes' => apply_filters( 'comment_form_attributes', array() ); 1536 1537 'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>', 1537 1538 '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>', 1538 1539 'logged_in_as' => '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>', … … 1548 1549 1549 1550 $args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) ); 1550 1551 1552 $form_additionaL_attributes = ''; 1553 foreach ($args['form_attributes'] as $attribute => $value) { 1554 $form_additionaL_attributes .= ' '.$attribute.'="'.$value.'"'; 1555 } 1556 1551 1557 ?> 1552 1558 <?php if ( comments_open() ) : ?> 1553 1559 <?php do_action( 'comment_form_before' ); ?> … … 1557 1563 <?php echo $args['must_log_in']; ?> 1558 1564 <?php do_action( 'comment_form_must_log_in_after' ); ?> 1559 1565 <?php else : ?> 1560 < form action="<?php echo site_url( '/wp-comments-post.php' ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>">1566 <?php echo apply_filters('comment_form_element', '<form action="'.site_url( '/wp-comments-post.php' ).'" method="post" id="'.esc_attr( $args['id_form'].'"'.$form_additionaL_attributes.'>'; ?> 1561 1567 <?php do_action( 'comment_form_top' ); ?> 1562 1568 <?php if ( is_user_logged_in() ) : ?> 1563 1569 <?php echo apply_filters( 'comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity ); ?>