[wp-trac] [WordPress Trac] #44010: Add general filters for registering various privacy policy information (cookies) from plugins

WordPress Trac noreply at wordpress.org
Tue May 8 19:04:24 UTC 2018


#44010: Add general filters for registering various privacy policy information
(cookies) from plugins
--------------------------+-----------------------------
 Reporter:  danieliser    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I didn't see it mentioned but during testing of integrating a real plugin,
 I found that it seems extremely complicated and out of order without some
 explicit filters for listing things like cookies.

 To be clear when a plugin adds additional suggested text it appears below
 the core text in a completely separate box. This is so detached it means
 if you have 10+ plugins this is gonna be an all-day process for any user
 to go through generating a policy for their needs.

 If I just append our plugin suggested text to the end and it has cookies,
 they will be separate from the other "Cookies" sections further up.

 I think the smarter approache is to implement something to the effect that
 we could register our cookies, analytics etc, just like the exporters.

 {{{#!php
 <?php
 add_filter( 'wp_privacy_policy_cookies_list', function ( $cookies =
 array() {
     $cookies['cookie_name'] = [
         'label' => __( 'Cookie Label' ),
         'reason' => __( 'Used for reason x, y & z' ),
     ];

     return $cookies;
 });
 }}}

 Then it could automatically be output via a shortcode or block or whatever
 to a table of

 |   Cookie Name    |  Cookie Label - Cookie Description  |
 |  wp_cookie_test  |  WP Test Cookie - Used to determine if cookies are
 available for use.  |

 The same would apply to several other sections. I think outputting those
 into a simple 2 column table would be easy to work with, clean output and
 easy enough for plugins & themes to integrate with.

 You could do similar and register user meta info collected, or even
 specific analytics plugins could output label and info on how they use the
 data directly under the Analytics heading.

 Monster Insights, for instance, might add

 Google Analytics: Tracks visitor engagement with the site anonymously for
 use in marketing & improvement.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44010>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list