From c229cdcba7cd0c76415bf747670a4f143c591402 Mon Sep 17 00:00:00 2001 From: nacin Date: Thu, 15 Apr 2010 16:25:08 +0000 Subject: [PATCH] Spacing/coding cleanup of comment_form(). see #13016. git-svn-id: http://svn.automattic.com/wordpress/trunk@14093 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 50 +++++++++++++++----------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 7d3ff4a84b..41d32788af 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -1493,32 +1493,30 @@ function comment_form( $args = array(), $post_id = null ) { $req = get_option( 'require_name_email' ); $aria_req = ( $req ? " aria-required='true'" : '' ); - $defaults = array( 'fields' => apply_filters( 'comment_form_default_fields', array( 'author' => '

' . - ' ' . - ( $req ? '*' : '' ) . - '

', - 'email' => '

' . - ' ' . - ( $req ? '*' : '' ) . - '

', - 'url' => '

' . - '' . - '

' ) ), - 'comment_field' => '

' . - '' . - '' . - '

', - 'must_log_in' => '

' . sprintf( __( 'You must be logged in to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '

', - 'logged_in_as' => '

' . sprintf( __( 'Logged in as %s. Log out?

' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ), - 'comment_notes_before' => '

' . __( 'Your email is never published nor shared.' ) . ( $req ? __( ' Required fields are marked *' ) : '' ) . '

', - 'comment_notes_after' => '
' . __( 'You may use these HTML tags and attributes:' ) . '
' . allowed_tags() . '
', - 'id_form' => 'commentform', - 'id_submit' => 'submit', - 'title_reply' => __( 'Leave a Reply' ), - 'title_reply_to' => __( 'Leave a Reply to %s' ), - 'cancel_reply_link' => __( 'Cancel reply' ), - 'label_submit' => __( 'Post Comment' ), - ); + $fields = array( + 'author' => '

' . ' ' . ( $req ? '*' : '' ) . + '

', + 'email' => '

' . ( $req ? '*' : '' ) . + '

', + 'url' => '

' . + '

', + ); + + $defaults = array( + 'fields' => apply_filters( 'comment_form_default_fields', $fields ), + 'comment_field' => '

', + 'must_log_in' => '

' . sprintf( __( 'You must be logged in to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '

', + 'logged_in_as' => '

' . sprintf( __( 'Logged in as %2$s. Log out?

' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ), + 'comment_notes_before' => '

' . __( 'Your email is never published nor shared.' ) . ( $req ? __( ' Required fields are marked *' ) : '' ) . '

', + 'comment_notes_after' => '
' . __( 'You may use these HTML tags and attributes:' ) . '
' . allowed_tags() . '
', + 'id_form' => 'commentform', + 'id_submit' => 'submit', + 'title_reply' => __( 'Leave a Reply' ), + 'title_reply_to' => __( 'Leave a Reply to %s' ), + 'cancel_reply_link' => __( 'Cancel reply' ), + 'label_submit' => __( 'Post Comment' ), + ); + $args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) ); ?>