← All changes
|
includes/abilities/settings/wdesignkit-remove-database.php
+6
-0
2.6.4
→
2.7.0
View file →
| @@ -63,8 +63,14 @@ | ||
| 63 | 63 | ], |
| 64 | 64 | 'execute_callback' => 'wdesignkit_mcp_remove_database', |
| 65 | 65 | 'permission_callback' => 'wdesignkit_mcp_permission_callback', |
| 66 | 66 | 'meta' => [ |
| 67 | + // action "execute" irreversibly deletes the plugin's stored data, which is the data half | |
| 68 | + // of deleting the plugin — gated on delete_plugins so a multisite site admin (who has | |
| 69 | + // manage_options but not delete_plugins) cannot wipe it. Enforced via | |
| 70 | + // wp_ability_permission_result (WP 7.1+); see class-wdk-ability-lifecycle.php. | |
| 71 | + 'required_capability' => 'delete_plugins', | |
| 72 | + 'public' => false, | |
| 67 | 73 | 'show_in_rest' => true, |
| 68 | 74 | 'mcp' => ['public' => false], |
| 69 | 75 | 'annotations' => [ |
| 70 | 76 | 'instructions' => implode("\n", [ |