Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#44342 closed defect (bug) (fixed)

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

Reported by: johnbillion's profile johnbillion Owned by: azaozz's profile azaozz
Milestone: 4.9.8 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 7 years ago.

Download all attachments as: .zip

Change History (7)

@felipeelia
7 years ago

#1 @felipeelia
7 years ago

  • Keywords has-patch added; needs-patch removed

#2 @azaozz
7 years 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
7 years ago

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

Reopen for 4.9.7.

#4 @nutellino
7 years ago

Hi guys

I saw that by deleting the code from the file comment template, after having sent a comment the comment is not visible, and it does not even show the writing: your comment is awaiting moderation.

how could you solve it?

#5 @ocean90
7 years ago

  • Milestone changed from 4.9.7 to 4.9.8

4.9.7 has been released, moving to next milestone.

#6 @SergeyBiryukov
7 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 43449:

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

Props felipeelia, johnbillion.
Merges [43370] to the 4.9 branch.
Fixes #44342.

Note: See TracTickets for help on using tickets.