In `comment_form()`, ensure that filtered arguments contain all required default values.

Merge of [32511] to the 4.2 branch.

Props boonebgorges.
Fixes #32312.


Built from https://develop.svn.wordpress.org/branches/4.2@33307


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2015-07-17 06:14:26 +00:00
parent c4faea356b
commit 722c40dda7
1 changed files with 3 additions and 0 deletions

View File

@ -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 ) ) : ?>
<?php
/**