From 63dd79d908b0e2dd033c5ab72d2a8303d6badf8d Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 9 Mar 2018 15:57:30 +0000 Subject: [PATCH] Respect the commenter decision when they have checked the checkbox to consent to cookies, and keep it checked when they reload the page or post another comment. See #43436. Built from https://develop.svn.wordpress.org/trunk@42815 git-svn-id: http://core.svn.wordpress.org/trunk@42645 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 52f1e11521..671c2298e5 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -2260,6 +2260,7 @@ function comment_form( $args = array(), $post_id = null ) { $req = get_option( 'require_name_email' ); $html_req = ( $req ? " required='required'" : '' ); $html5 = 'html5' === $args['format']; + $consent = empty( $commenter['comment_author_email'] ) ? '' : ' checked="checked"'; $fields = array( 'author' => '

' . ' ' . '

', @@ -2268,7 +2269,7 @@ function comment_form( $args = array(), $post_id = null ) { 'url' => '

' . '

', 'cookies' => '', ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 316bc474bf..7ff517ec7b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42814'; +$wp_version = '5.0-alpha-42815'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.