From 96f787260f1d891fe262cb49acf0e752643a7c4e Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 19 May 2015 01:04:25 +0000 Subject: [PATCH] In `comment_form()`, ensure that filtered arguments contain all required default values. props boonebgorges. fixes #32312 for trunk. Built from https://develop.svn.wordpress.org/trunk@32511 git-svn-id: http://core.svn.wordpress.org/trunk@32481 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 77f16d9ab2..2f1c59ee5d 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -2252,6 +2252,9 @@ function comment_form( $args = array(), $post_id = null ) { */ $args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) ); + // Ensure that the filtered args contain all required default values. + $args = array_merge( $defaults, $args ); + if ( comments_open( $post_id ) ) : ?>