From a90f215d2c9258fcdf87997679148e6bbfea89f9 Mon Sep 17 00:00:00 2001
From: Sergey Biryukov
Date: Tue, 24 Jul 2018 17:06:24 +0000
Subject: [PATCH] Privacy: Revert [43525].
The commenter cookies checkbox is not legally required, so should be disabled by default.
Fixes #44373.
Built from https://develop.svn.wordpress.org/trunk@43531
git-svn-id: http://core.svn.wordpress.org/trunk@43360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
---
wp-admin/includes/schema.php | 3 +++
wp-admin/options-discussion.php | 7 +++++++
wp-admin/options.php | 1 +
wp-includes/comment-template.php | 2 +-
wp-includes/version.php | 2 +-
5 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php
index 4be5d5399a..a41f9b5e5b 100644
--- a/wp-admin/includes/schema.php
+++ b/wp-admin/includes/schema.php
@@ -535,6 +535,9 @@ function populate_options() {
// 4.9.6
'wp_page_for_privacy_policy' => 0,
+
+ // 4.9.8
+ 'show_comments_cookies_opt_in' => 0,
);
// 3.3
diff --git a/wp-admin/options-discussion.php b/wp-admin/options-discussion.php
index c98c441103..48fb552bb8 100644
--- a/wp-admin/options-discussion.php
+++ b/wp-admin/options-discussion.php
@@ -85,6 +85,13 @@ printf(
?>
+
+
+ />
+
+
+
+
/>
array(
'thumbnail_size_w',
diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php
index 19df07d160..1f7596dc55 100644
--- a/wp-includes/comment-template.php
+++ b/wp-includes/comment-template.php
@@ -2271,7 +2271,7 @@ function comment_form( $args = array(), $post_id = null ) {
'
',
);
- if ( has_action( 'set_comment_cookies', 'wp_set_comment_cookies' ) ) {
+ if ( has_action( 'set_comment_cookies', 'wp_set_comment_cookies' ) && get_option( 'show_comments_cookies_opt_in' ) ) {
$consent = empty( $commenter['comment_author_email'] ) ? '' : ' checked="checked"';
$fields['cookies'] = '';
diff --git a/wp-includes/version.php b/wp-includes/version.php
index d03e29034c..3f32f004c0 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
-$wp_version = '5.0-alpha-43529';
+$wp_version = '5.0-alpha-43531';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.