From a48e17cca12872b1704cbb84542332cbfa0b18b5 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 17 Feb 2010 19:28:03 +0000 Subject: [PATCH] Comment form output tweaks. Props beaulebens. see #10910 git-svn-id: http://svn.automattic.com/wordpress/trunk@13180 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyten/style.css | 45 ++++++++++++++++-------- wp-includes/comment-template.php | 50 +++++++++++++-------------- 2 files changed, 55 insertions(+), 40 deletions(-) diff --git a/wp-content/themes/twentyten/style.css b/wp-content/themes/twentyten/style.css index 14117f825..e367f8702 100644 --- a/wp-content/themes/twentyten/style.css +++ b/wp-content/themes/twentyten/style.css @@ -114,7 +114,7 @@ h3#comments-title, h3#reply-title, #access .menu, #cancel-comment-reply-link, -#form-allowed-tags, +.form-allowed-tags, #site-info, #site-title, #wp-calendar, @@ -127,7 +127,7 @@ h3#reply-title, .entry-meta, .entry-title, .entry-utility, -.form-label, +#respond label, .navigation, .page-title, .pingback p, @@ -972,6 +972,12 @@ h3#comments-title { overflow: hidden; position: relative; } +#respond p { + margin: 0; +} +#respond .comment-notes { + margin-bottom: 1em; +} .children #respond { margin: 0 48px 0 0; } @@ -993,32 +999,41 @@ h3#reply-title { color:#FF4B33; font-weight:bold; } -.form-section label { +#respond label { color: #888; font-size: 12px; } -.form-section input { +#respond input { margin:0 0 9px 0; width:98%; } -.form-section textarea { +#respond textarea { width:99%; } -#form-allowed-tags { - color:#888; +#respond dt, +#respond dd { + color: #888; font-size: 12px; line-height: 18px; } -#form-allowed-tags p { - margin:0; -} -#form-allowed-tags span { -} -#form-allowed-tags code { +#respond dd code { font-size: 11px; } -.form-submit { - margin: 12px 0 24px 0; +#respond .form-submit { + margin: 0 0 24px; +} +#respond .form-submit input { + width: auto; +} +#respond dl { + margin: 0 0 10px; +} +#respond dt { + display: inline; + font-weight: normal; +} +#respond dd { + display: inline; } diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 7a467fb27..2db63844c 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -1466,32 +1466,32 @@ 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() . '

-
', + $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'), + 'title_reply_to' => __( 'Leave a Reply to %s' ), 'cancel_reply_link' => __( 'Cancel reply' ), 'label_submit' => __( 'Post Comment' ), ); @@ -1523,10 +1523,10 @@ function comment_form( $args = array(), $post_id = null ) { -
+

-

+