diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 661c82f891..5bcbcd674e 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -2209,6 +2209,11 @@ function comment_form( $args = array(), $post_id = null ) { $consent = empty( $commenter['comment_author_email'] ) ? '' : ' checked="checked"'; $fields['cookies'] = ''; + + // Ensure that the passed fields include cookies consent. + if ( isset( $args['fields'] ) && ! isset( $args['fields']['cookies'] ) ) { + $args['fields']['cookies'] = $fields['cookies']; + } } $required_text = sprintf( ' ' . __( 'Required fields are marked %s' ), '*' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 5290365da7..e932739f28 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9.8-beta2-43523'; +$wp_version = '4.9.8-beta2-43524'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.