Changes between Version 4 and Version 5 of Ticket #51188
- Timestamp:
- 08/31/2020 11:44:26 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #51188 – Description
v4 v5 32 32 Adding too many consent types would make it unwieldy and unnecessarily complicated for website visitors. 33 33 However, there are certainly use cases in which site owners / admins may need more granular control. 34 Let's say, for example, that the website offers a newsletter, but also wants user permission for third party targeted advertising on the website. The site owner may not want to exclude everyone who opts out of the latter from receiving their newsletter.35 Another possible use case may be notifications. A site owner / admin may not wish to exclude someone from setting their preferred admin colour scheme if they do not wish to consent to notifications.36 34 37 35 It seems that the best way to do this would be to provide a function in Core that would allow plugins to register **sub**-consent types. … … 44 42 It does not seem desirable to save multiple user_meta values relating to consent per user, for performance reasons. 45 43 A possible model might look something like the meta value for user capabilities. 44 45 Example 1: 46 47 The website offers a newsletter, but also wants user permission for third party targeted advertising on the website. The site owner does not want to exclude everyone who opts out of the latter from receiving their newsletter. 48 The website offers notifications. The site owner / admin does not wish to exclude someone from setting their preferred admin colour scheme if they do not wish to consent to notifications. 46 49 47 50 {{{#!php … … 82 85 The above should be appropriately serialized before being saved to the database. 83 86 87 Example 2: 88 89 This shows a use case for which one additional top-level consent type (not exposed to the front end, only available on /wp-admin/) would be very useful. 90 Plugin authors are currently allowed to advertise / provide notices, as long as they don't hijack the admin panel. 91 One of the most common ways to permanently dismiss a notice is to add a user_meta value for it - which isn't the best use of the database / ideal for performance. 92 93 The below may allow for theme authors to be able to provide installation / setup instructions via admin notifications as well. This ticket only shows a possible way it could be done. All discussion about the theme guidelines themselves should happen during Team meetings and on the relevant P2 posts. 94 In this example, the notice has not yet been permanently dismissed. Once the notice has been permanently dismissed for that user, the boolean value for that theme under "repos" should be set to "false". 95 96 {{{#!php 97 <?php 98 $consents = array( 99 'functional' => array( 100 'comprehensive' => true, 101 'remainder' => true 102 ), 103 'preferences' => array( 104 'comprehensive' => false, 105 'remainder' => true 106 ), 107 'anon_stats' => array( 108 'comprehensive' => true, 109 'remainder' => true 110 ), 111 'stats' => array( 112 'comprehensive' => false, 113 'remainder' => false 114 ), 115 'marketing' => array( 116 'comprehensive' => false, 117 'remainder' => true 118 ), 119 'repos' => array( 120 'comprehensive' => false, 121 'exampleTheme" => true, 122 'remainder' => false 123 ) 124 ); 125 }}} 126 127 The above should be appropriately serialized before being saved to the database. 128 84 129 **Acknowledgements:** 85 130