Skip to content

Commit 335b69c

Browse files
Privacy: Remove the setting to enable comment cookies consent added in [43469].
This needs some more work to ensure expected behaviour. See #44373. git-svn-id: https://develop.svn.wordpress.org/trunk@43525 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 3aba622 commit 335b69c

File tree

5 files changed

+1
-16
lines changed

5 files changed

+1
-16
lines changed

src/wp-admin/includes/schema.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,9 +535,6 @@ function populate_options() {
535535

536536
// 4.9.6
537537
'wp_page_for_privacy_policy' => 0,
538-
539-
// 4.9.8
540-
'show_comments_cookies_opt_in' => 0,
541538
);
542539

543540
// 3.3

src/wp-admin/options-discussion.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,6 @@
8585
?>
8686
</label>
8787
<br />
88-
89-
<label for="show_comments_cookies_opt_in">
90-
<input name="show_comments_cookies_opt_in" type="checkbox" id="show_comments_cookies_opt_in" value="1" <?php checked( '1', get_option( 'show_comments_cookies_opt_in' ) ); ?> />
91-
<?php _e( 'Show comments cookies opt-in checkbox.' ); ?>
92-
</label>
93-
<br />
94-
9588
<label for="thread_comments">
9689
<input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked( '1', get_option( 'thread_comments' ) ); ?> />
9790
<?php

src/wp-admin/options.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@
116116
'default_comments_page',
117117
'comment_order',
118118
'comment_registration',
119-
'show_comments_cookies_opt_in',
120119
),
121120
'media' => array(
122121
'thumbnail_size_w',

src/wp-includes/comment-template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2271,7 +2271,7 @@ function comment_form( $args = array(), $post_id = null ) {
22712271
'<input id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" maxlength="200" /></p>',
22722272
);
22732273

2274-
if ( has_action( 'set_comment_cookies', 'wp_set_comment_cookies' ) && get_option( 'show_comments_cookies_opt_in' ) ) {
2274+
if ( has_action( 'set_comment_cookies', 'wp_set_comment_cookies' ) ) {
22752275
$consent = empty( $commenter['comment_author_email'] ) ? '' : ' checked="checked"';
22762276
$fields['cookies'] = '<p class="comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"' . $consent . ' />' .
22772277
'<label for="wp-comment-cookies-consent">' . __( 'Save my name, email, and website in this browser for the next time I comment.' ) . '</label></p>';

tests/phpunit/tests/comment/commentForm.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,13 @@ public function filter_comment_form_defaults( $defaults ) {
8787
public function test_fields_should_include_cookies_consent() {
8888
$p = self::factory()->post->create();
8989

90-
add_filter( 'option_show_comments_cookies_opt_in', '__return_true' );
91-
9290
$args = array(
9391
'fields' => array(
9492
'author' => 'Hello World!',
9593
),
9694
);
9795
$form = get_echo( 'comment_form', array( $args, $p ) );
9896

99-
remove_filter( 'option_show_comments_cookies_opt_in', '__return_true' );
100-
10197
$this->assertRegExp( '|<p class="comment\-form\-cookies\-consent">.*?</p>|', $form );
10298
}
10399
}

0 commit comments

Comments
 (0)