| 48 | } |
| 49 | } |
| 50 | }}} |
| 51 | |
| 52 | Illustrative example: Database Management |
| 53 | |
| 54 | In this example, a plugin author would like to disclose how their code interacts with the site's database(s). |
| 55 | The author would include the following in a file named disclosures.json in the plugin's main folder to indicate that: |
| 56 | - The plugin does not write information to the database that was not explicitly input by a(n authorized) user; |
| 57 | - The plugin does write information to the database that was explicitly input by a(n authorized) user; |
| 58 | - The plugin creates a Custom Post Type called ExampleCPT; |
| 59 | - The plugin allows a(n authorized) user to create their own Custom Post Types; |
| 60 | - The plugin creates a custom table called PluginTable; |
| 61 | - The plugin allows a(n authorized) user to create their own custom tables. |
| 62 | |
| 63 | {{{#!php |
| 64 | <?php |
| 65 | { |
| 66 | "database": { |
| 67 | "writesToDB: { |
| 68 | "auto": [ |
| 69 | FALSE |
| 70 | ], |
| 71 | "manual": [ |
| 72 | TRUE, |
| 73 | "edit_private_posts" |
| 74 | ] |
| 75 | }, |
| 76 | "CPT": { |
| 77 | "auto": [ |
| 78 | TRUE, |
| 79 | "ExampleCPT" |
| 80 | ], |
| 81 | "manual": [ |
| 82 | TRUE, |
| 83 | "delete_private_posts" |
| 84 | ] |
| 85 | }, |
| 86 | "customTables": { |
| 87 | "auto": [ |
| 88 | TRUE, |
| 89 | "PluginTable" |
| 90 | ], |
| 91 | "manual": [ |
| 92 | TRUE, |
| 93 | "delete_plugins" |
| 94 | ] |
| 95 | } |