From 5df204fab49a0fa21e27f984920dc6e18975b4ab Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Tue, 6 Oct 2015 17:17:24 +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. Built from https://develop.svn.wordpress.org/trunk@34871 git-svn-id: http://core.svn.wordpress.org/trunk@34836 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 8 +++++--- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 99cd5716e2..097baf56f3 100644 --- a/wp-includes/comment-template.php +++ b/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 : ?> -
> + >