[wp-trac] [WordPress Trac] #44179: Use wp_update_comment instead of $wpdb->update $wpdb->comments when anonymizing comments

WordPress Trac noreply at wordpress.org
Mon Jun 11 18:13:00 UTC 2018


#44179: Use wp_update_comment instead of $wpdb->update $wpdb->comments when
anonymizing comments
------------------------------+------------------------------
 Reporter:  allendav          |       Owner:  (none)
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Privacy           |     Version:  trunk
 Severity:  normal            |  Resolution:
 Keywords:  gdpr needs-patch  |     Focuses:
------------------------------+------------------------------

Comment (by allendav):

 To test:

 - Apply the patch
 - Generate lots of comments (e.g. 500) for some email address (bonus: I
 put a plugin here to make that easier:
 https://github.com/allendav/commentariat )
 - Use wp-admin > Tools > Erase Personal Data to anonymize that email
 address's comments

 Note: During my testing I saw the old method take < 1 second to directly
 update the table for 500 comments and < 2 seconds to use this hookable
 method. Yes, it is slower but not horribly so and it allows plugins that
 hook comment updates (like Jetpack) to stay involved and aware of the now
 anonymized comment.

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


More information about the wp-trac mailing list