From be303910e9744d71fcbbadef352eaedc44af412a Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Tue, 6 Oct 2015 17:16:09 +0000 Subject: [PATCH] Template: Introduce a new `class_form` argument in `comment_form()`, allowing customization of the form class attribute. The static 'comment-form' class was originally added to `comment_form()` in [24525]. This new argument should provide needed flexibility in styling the comment form further. Props flixos90. Fixes #34170. See #23851. git-svn-id: https://develop.svn.wordpress.org/trunk@34871 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/comment-template.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php index 99cd5716e2..097baf56f3 100644 --- a/src/wp-includes/comment-template.php +++ b/src/wp-includes/comment-template.php @@ -2002,8 +2002,8 @@ function wp_list_comments( $args = array(), $comments = null ) { * * @since 3.0.0 * @since 4.1.0 Introduced the 'class_submit' argument. - * @since 4.2.0 Introduced 'submit_button' and 'submit_fields' arguments. - * @since 4.4.0 Introduced 'title_reply_before', 'title_reply_after', + * @since 4.2.0 Introduced the 'submit_button' and 'submit_fields' arguments. + * @since 4.4.0 Introduced the 'class_form', 'title_reply_before', 'title_reply_after', * 'cancel_reply_before', and 'cancel_reply_after' arguments. * * @param array $args { @@ -2024,6 +2024,7 @@ function wp_list_comments( $args = array(), $comments = null ) { * @type string $comment_notes_after HTML element for a message displayed after the comment form. * @type string $id_form The comment form element id attribute. Default 'commentform'. * @type string $id_submit The comment submit element id attribute. Default 'submit'. + * @type string $class_form The comment form element class attribute. Default 'comment-form'. * @type string $class_submit The comment submit element class attribute. Default 'submit'. * @type string $name_submit The comment submit element name attribute. Default 'submit'. * @type string $title_reply The translatable 'reply' button label. Default 'Leave a Reply'. @@ -2092,6 +2093,7 @@ function comment_form( $args = array(), $post_id = null ) { 'comment_notes_after' => '', 'id_form' => 'commentform', 'id_submit' => 'submit', + 'class_form' => 'comment-form', 'class_submit' => 'submit', 'name_submit' => 'submit', 'title_reply' => __( 'Leave a Reply' ), @@ -2153,7 +2155,7 @@ function comment_form( $args = array(), $post_id = null ) { */ do_action( 'comment_form_must_log_in_after' ); else : ?> -
> + >