WordPress.org

Make WordPress Core

Opened 2 weeks ago

Last modified 5 days ago

#44342 reopened defect (bug)

Commenter cookie consent message should not be displayed if the cookie action isn't hooked

Reported by: johnbillion Owned by: azaozz
Milestone: 4.9.7 Priority: normal
Severity: normal Version: 4.9.6
Component: Comments Keywords: has-patch commit fixed-major
Focuses: privacy Cc:

Description

If you do not at all wish for commenters to get cookies set in their browser when they comment, the functionality can be disabled by unhooking the wp_set_comment_cookies callback. Example:

remove_action( 'set_comment_cookies', 'wp_set_comment_cookies' );

The Save my name, email, and website in this browser for the next time I comment message should only be added to the comment form fields when wp_set_comment_cookies() is hooked into the set_comment_cookies action, otherwise the message is incorrect.

The message should be displayed conditionally based on has_action( 'set_comment_cookies', 'wp_set_comment_cookies' ).

Attachments (1)

44342.diff (2.3 KB) - added by felipeelia 2 weeks ago.

Download all attachments as: .zip

Change History (4)

@felipeelia
2 weeks ago

#1 @felipeelia
2 weeks ago

  • Keywords has-patch added; needs-patch removed

#2 @azaozz
5 days ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 43370:

Privacy: do not show the comment cookies opt-in checkbox (on the front-end comments form) when comment cookies are disabled.

Props felipeelia, johnbillion.
Fixes #44342.

#3 @azaozz
5 days ago

  • Keywords commit fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen for 4.9.7.

Note: See TracTickets for help on using tickets.