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.