Make WordPress Core

Changes between Version 15 and Version 16 of Ticket #51092


Ignore:
Timestamp:
08/27/2020 01:31:59 PM (5 years ago)
Author:
carike
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #51092 – Description

    v15 v16  
    1515**The Solution:**
    1616
    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.
     17Each 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.
    1918
    2019In 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.
     20As URLs are not one of the six data types accepted by JSON, these types have been set as "string"s.
     21The format for internal URLs has been set to "uri-reference" to allow for relative URLs.
     22Items are not marked as "uniqueItems" because we would rather warn (after validation in PHP) than reject the file because of duplicates.
    2223
    2324**Scope:**
    2425
    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!
     26This 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.
    2831
    2932{{{#!php
     
    6669         "properties": {
    6770            "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               }
    7177            },
    7278            "localAssets": {
     
    7783                  "format": "uri"
    7884               },
    79                "uniqueItems": true
    8085            },
    8186            "remoteAssets": {
     
    8691                  "format": "uri"
    8792               },
    88                "uniqueItems": true
    8993            }
    9094         }
     
    105109                  "format": "uri"
    106110               },
    107                "uniqueItems": true
    108111            },
    109112            "JavaScript": {
     
    114117                  "format": "uri"
    115118               },
    116                "uniqueItems": true
    117119            },
    118120            "CSS": {
     
    123125                  "format": "uri"
    124126               },
    125                "uniqueItems": true
    126127            }
    127128         }
     
    141142                  "type": "string",
    142143                  "format": "uri"
    143                },
    144                "uniqueItems": true
     144               }
    145145            },
    146146            "externalAPIs": {
     
    150150                  "type": "string",
    151151                  "format": "uri"
    152                },
    153                "uniqueItems": true
     152               }
    154153            },
    155154            "remoteAssets": {
     
    159158                  "type": "string",
    160159                  "format": "uri"
    161                },
    162                "uniqueItems": true
     160               }
    163161            },
    164162            "registration": {
     
    168166                  "type": "string",
    169167                  "format": "uri"
    170                },
    171                "uniqueItems": true
     168               }
    172169            }
    173170         }
     
    187184                  "type": "string",
    188185                  "format": "uri-reference"
    189                },
    190                "uniqueItems": true
     186               }
    191187            },
    192188            "feeds": {
     
    196192                  "type": "string",
    197193                  "format": "uri-reference"
    198                },
    199                "uniqueItems": true
     194               }
    200195            }
    201196         }
     
    213208               "items": {
    214209                  "type": "string",
    215                },
    216                "uniqueItems": true
     210               }
    217211            },
    218212            "setsCookiesJavaScript": {
     
    221215               "items": {
    222216                  "type": "string",
    223                },
    224                "uniqueItems": true
     217               }
    225218            },
    226219            "usesLocalStorage": {
     
    365358            "ppiExport": {
    366359               "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
    368367            },
    369368            "ppiErasure": {
    370369               "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
    372377            },
    373378            "consentAPI": {
    374379               "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
    376387            },
    377388            "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
    380397            },
    381398            "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
    384407            }
    385408         }
     
    404427               "additionalItems": {
    405428                  "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"
    407431               }
    408432            },
     
    418442               "additionalItems": {
    419443                  "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"
    421446               }
    422447            },
     
    431456               ],
    432457               "additionalItems": {
    433                   "type": "string"
     458                  "type": "string",
     459                  "format": "uri"
    434460               }
    435461            },
     
    445471               "additionalItems": {
    446472                  "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"
    448475               }
    449476            },
     
    459486               "additionalItems": {
    460487                  "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"
    462490               }
    463491            }
     
    468496}}}
    469497
     498Thanks to Timothy for suggesting that we use a .json file instead of plugin and theme headers.
     499Thanks to Swissspidy for information on i18n - see comment below.
    470500Thanks to Apedog for suggesting improved phrasing for the "external" property's description.