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

props boonebgorges.
fixes #32312 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@32511 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2015-05-19 01:03:39 +00:00
parent 03e04a0c1c
commit 09bd58b4c9
2 changed files with 31 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
/**