[wp-trac] [WordPress Trac] #44736: Comment cookies are completely disabled when "Show comments cookies opt-in checkbox" is not enabled
WordPress Trac
noreply at wordpress.org
Sun Aug 5 21:07:21 UTC 2018
#44736: Comment cookies are completely disabled when "Show comments cookies opt-in
checkbox" is not enabled
--------------------------+-----------------------------
Reporter: pputzer | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 4.9.8
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
#44373 introduced a setting to disable the comment cookies opt-in checkbox
introduced in 4.9.6. Unfortunately, the patch neglected to set
`$cookies_consent` to true in that case in
[https://core.trac.wordpress.org/browser/tags/4.9.8/src/wp-comments-
post.php#L36 wp-comment-post.php]. This means that when the setting (in
`options-discussion.php`) is disabled, no cookies will be set.
To fix the issue, the line
`$cookies_consent = ( isset( $_POST['wp-comment-cookies-consent'] ) );`
should be changed to
`$cookies_consent = ( isset( $_POST['wp-comment-cookies-consent'] ) || !
get_option( 'show_comments_cookies_opt_in' ) );`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44736>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list