[wp-trac] [WordPress Trac] #43545: Helper functions: Anonymizing data in a standardized way

WordPress Trac noreply at wordpress.org
Wed Apr 11 08:12:03 UTC 2018


#43545: Helper functions: Anonymizing data in a standardized way
--------------------------------+---------------------
 Reporter:  dejliglama          |       Owner:  (none)
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  5.0
Component:  Options, Meta APIs  |     Version:  trunk
 Severity:  normal              |  Resolution:
 Keywords:  needs-patch gdpr    |     Focuses:
--------------------------------+---------------------

Comment (by azaozz):

 Replying to [comment:29 iandunn]:
 > FYI, there was a recent bug fix to the Events Widget IP anonymization in
 r42968, so that should probably be synced here.

 Yep, thanks for the ping! :)

 > Although, rather than duplicating that code, would it be better to
 abstract it into a modular function that can be used by both the GDPR
 anonymization and the Events Widget anonymization?

 Yeah, was thinking that too. In 43545.4.diff:
 - Abstract the code that anonymizes IP address and use it in both the
 Events Widget and `wp_privacy_anonymize_data()`.
 - Make `$type` required in `wp_privacy_anonymize_data()`. The right data
 type is pretty important. Thinking it's better to always pass it rather
 than get an empty string for unspecified types. That will let us add more
 types in the future if needed.
 - Clean up the test a bit.

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


More information about the wp-trac mailing list