[wp-trac] [WordPress Trac] #43588: Anonymize commenter IP address once a comment is no longer pending

WordPress Trac noreply at wordpress.org
Wed Mar 21 15:59:12 UTC 2018


#43588: Anonymize commenter IP address once a comment is no longer pending
-----------------------------------------------+---------------------------
 Reporter:  allendav                           |       Owner:
     Type:  enhancement                        |      Status:  new
 Priority:  normal                             |   Milestone:  Awaiting
Component:  General                            |  Review
 Severity:  normal                             |     Version:  trunk
 Keywords:  gdpr needs-patch needs-unit-tests  |  Resolution:
                                               |     Focuses:
-----------------------------------------------+---------------------------
Changes (by birgire):

 * keywords:  gdpr needs-patch => gdpr needs-patch needs-unit-tests


Comment:

 The insert and update comment functions come to mind:

 - {{{wp_insert_comment()}}}
 - {{{wp_update_comment()}}}

 where e.g.:

 - {{{wp_new_comment()}}} is a wrapper for {{{wp_insert_comment()}}}.
 - {{{edit_comment()}}} is wrapper for {{{wp_update_comment()}}}.
 - {{{wp_filter_comment()}}} within {{{wp_new_comment()}}}.

 So within {{{wp_insert_comment()}}} and {{{wp_update_comment()}}} we could
 consider something like:

 {{{
 // Anonymize the comment author's IP, if the comment is not pending.
 if( 0 !== $data['comment_approved'] ) {
     $data['comment_author_IP'] = wp_privacy_anonymize_ip(
 $data['comment_author_IP'] );
 }
 }}}

 where {{{wp_privacy_anonymize_ip()}}} comes from #43545

 Further we might consider what should happen when the {{{pending}}}
 comment status is changed with {{{wp_transition_comment_status()}}}.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43588#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list