Changes between Version 15 and Version 16 of Ticket #51092
- Timestamp:
- 08/27/2020 01:31:59 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #51092 – Description
v15 v16 15 15 **The Solution:** 16 16 17 Timothy suggested that each plugin could have a privacy.json file, which could then be read by Core (and Meta) using relatively simple REST API functionality. 18 As all items are not strictly privacy related, the file will be called disclosures.json instead. 17 Each plugin, theme and core component can have a file called disclosures.json that could be read by Core (and Meta) using relatively simple REST API functionality. 19 18 20 19 In its current form, the JSON schema does not set any fields as "required". 21 As URLs are not one of the six data types accepted by JSON, these types have been set as "string"s. The format has been set to "uri-reference" to allow for relative URLs. 20 As URLs are not one of the six data types accepted by JSON, these types have been set as "string"s. 21 The format for internal URLs has been set to "uri-reference" to allow for relative URLs. 22 Items are not marked as "uniqueItems" because we would rather warn (after validation in PHP) than reject the file because of duplicates. 22 23 23 24 **Scope:** 24 25 25 This ticket proposes a JSON schema. Future tickets will deal with the validation and the display respectively. 26 In the ticket to follow this one, the validation of the schema should include appropriate validation of the URLs in PHP. 27 Further tickets should include ones to update WP-CLI and WordPress.org to make the strings translatable. Thanks to Swissspidy for the comment below! 26 This ticket proposes the schema. 27 [] will be created for the validation of the schema by Core (particularly the URLs using PHP). 28 [] will be created for internationalization (WP CLI and WordPress.org). 29 #51156 creates developer documentation. 30 #51144 proposes a UI for site-level privacy disclosures and related settings. 28 31 29 32 {{{#!php … … 66 69 "properties": { 67 70 "code": { 68 "description": "A URL to the license that applies to this component (plugin, theme, or Core component)'s use.", 69 "type": "string", 70 "format": "uri" 71 "description": "A comma-separated list of URLs linking to the licenses that applies to this component (plugin, theme, or Core component)'s use.", 72 "type": "array", 73 "items": { 74 "type": "string", 75 "format": "uri" 76 } 71 77 }, 72 78 "localAssets": { … … 77 83 "format": "uri" 78 84 }, 79 "uniqueItems": true80 85 }, 81 86 "remoteAssets": { … … 86 91 "format": "uri" 87 92 }, 88 "uniqueItems": true89 93 } 90 94 } … … 105 109 "format": "uri" 106 110 }, 107 "uniqueItems": true108 111 }, 109 112 "JavaScript": { … … 114 117 "format": "uri" 115 118 }, 116 "uniqueItems": true117 119 }, 118 120 "CSS": { … … 123 125 "format": "uri" 124 126 }, 125 "uniqueItems": true126 127 } 127 128 } … … 141 142 "type": "string", 142 143 "format": "uri" 143 }, 144 "uniqueItems": true 144 } 145 145 }, 146 146 "externalAPIs": { … … 150 150 "type": "string", 151 151 "format": "uri" 152 }, 153 "uniqueItems": true 152 } 154 153 }, 155 154 "remoteAssets": { … … 159 158 "type": "string", 160 159 "format": "uri" 161 }, 162 "uniqueItems": true 160 } 163 161 }, 164 162 "registration": { … … 168 166 "type": "string", 169 167 "format": "uri" 170 }, 171 "uniqueItems": true 168 } 172 169 } 173 170 } … … 187 184 "type": "string", 188 185 "format": "uri-reference" 189 }, 190 "uniqueItems": true 186 } 191 187 }, 192 188 "feeds": { … … 196 192 "type": "string", 197 193 "format": "uri-reference" 198 }, 199 "uniqueItems": true 194 } 200 195 } 201 196 } … … 213 208 "items": { 214 209 "type": "string", 215 }, 216 "uniqueItems": true 210 } 217 211 }, 218 212 "setsCookiesJavaScript": { … … 221 215 "items": { 222 216 "type": "string", 223 }, 224 "uniqueItems": true 217 } 225 218 }, 226 219 "usesLocalStorage": { … … 365 358 "ppiExport": { 366 359 "description": "Does the developer, in good faith, consider the code to be compatible with the PPI Export Tool in WordPress?", 367 "type": "boolean" 360 "type": "array", 361 "items": [ 362 { 363 "type": "boolean" 364 } 365 ], 366 "additionalItems": false 368 367 }, 369 368 "ppiErasure": { 370 369 "description": "Does the developer, in good faith, consider the code to be compatible with the PPI Erasure Tool in WordPress?", 371 "type": "boolean" 370 "type": "array", 371 "items": [ 372 { 373 "type": "boolean" 374 } 375 ], 376 "additionalItems": false 372 377 }, 373 378 "consentAPI": { 374 379 "description": "Does the developer, in good faith, consider the code to be compatible with the WordPress Consent API?", 375 "type": "boolean" 380 "type": "array", 381 "items": [ 382 { 383 "type": "boolean" 384 } 385 ], 386 "additionalItems": false 376 387 }, 377 388 "disclosuresTab": { 378 "description": "Do the developer, in good faith, consider the code to be compatible with the Disclosure Tab?", 379 "type": "boolean" 389 "description": "Does the developer, in good faith, consider the code to be compatible with the Disclosure Tab?", 390 "type": "array", 391 "items": [ 392 { 393 "type": "boolean" 394 } 395 ], 396 "additionalItems": false 380 397 }, 381 398 "permissionsTab": { 382 "description": "Do the developer, in good faith, consider the code to be compatible with the Permissions Tab?", 383 "type": "boolean" 399 "description": "Does the developer, in good faith, consider the code to be compatible with the Permissions Tab?", 400 "type": "array", 401 "items": [ 402 { 403 "type": "boolean" 404 } 405 ], 406 "additionalItems": false 384 407 } 385 408 } … … 404 427 "additionalItems": { 405 428 "description": "A comma-separate list of URLs linking to the Terms of Service that apply to any paid version, or extension, or other products or services from the same author(s).", 406 "type": "string" 429 "type": "string", 430 "format": "uri" 407 431 } 408 432 }, … … 418 442 "additionalItems": { 419 443 "description": "A comma-separated list of URLs linking to the Terms of Service that apply to the platform being used to facilitate donations.", 420 "type": "string" 444 "type": "string", 445 "format": "uri" 421 446 } 422 447 }, … … 431 456 ], 432 457 "additionalItems": { 433 "type": "string" 458 "type": "string", 459 "format": "uri" 434 460 } 435 461 }, … … 445 471 "additionalItems": { 446 472 "description": "A comma-separated list of URLs linking to the Terms of Service that apply to affiliate networks being promoted by the code.", 447 "type": "string" 473 "type": "string", 474 "format": "uri" 448 475 } 449 476 }, … … 459 486 "additionalItems": { 460 487 "description": "A comma-separated list of URLs linking to the Terms of Service that apply to any products or services that are being advertised by the code.", 461 "type": "string" 488 "type": "string", 489 "format": "uri" 462 490 } 463 491 } … … 468 496 }}} 469 497 498 Thanks to Timothy for suggesting that we use a .json file instead of plugin and theme headers. 499 Thanks to Swissspidy for information on i18n - see comment below. 470 500 Thanks to Apedog for suggesting improved phrasing for the "external" property's description.