← All changes
|
includes/abilities/workspace/wdesignkit-workspace.php
+20
-15
2.4.0
→
2.7.0
View file →
| @@ -9,12 +9,12 @@ | ||
| 9 | 9 | exit(); |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | 12 | wp_register_ability('wdesignkit/create-workspace', [ |
| 13 | - 'label' => __('Create WDesignKit Workspace', 'sprout-mcp'), | |
| 13 | + 'label' => __('Create WDesignKit Workspace', 'wdesignkit'), | |
| 14 | 14 | 'description' => __( |
| 15 | 15 | 'Creates a new cloud workspace in WDesignKit. A workspace is a shared environment for organising templates, widgets, and code snippets for team collaboration. Requires cloud login.', |
| 16 | - 'sprout-mcp', | |
| 16 | + 'wdesignkit', | |
| 17 | 17 | ), |
| 18 | 18 | 'category' => 'wdesignkit', |
| 19 | 19 | 'input_schema' => [ |
| 20 | 20 | 'type' => 'object', |
| @@ -40,10 +40,11 @@ | ||
| 40 | 40 | 'response' => ['type' => ['object', 'array']], |
| 41 | 41 | ], |
| 42 | 42 | ], |
| 43 | 43 | 'execute_callback' => 'wdesignkit_mcp_create_workspace', |
| 44 | - 'permission_callback' => 'sprout_mcp_permission_callback', | |
| 44 | + 'permission_callback' => 'wdesignkit_mcp_permission_callback', | |
| 45 | 45 | 'meta' => [ |
| 46 | + 'public' => true, | |
| 46 | 47 | 'show_in_rest' => true, |
| 47 | 48 | 'mcp' => ['public' => true], |
| 48 | 49 | 'annotations' => [ |
| 49 | 50 | 'instructions' => implode("\n", [ |
| @@ -59,12 +60,12 @@ | ||
| 59 | 60 | ], |
| 60 | 61 | ]); |
| 61 | 62 | |
| 62 | 63 | wp_register_ability('wdesignkit/delete-workspace', [ |
| 63 | - 'label' => __('Delete WDesignKit Workspace', 'sprout-mcp'), | |
| 64 | + 'label' => __('Delete WDesignKit Workspace', 'wdesignkit'), | |
| 64 | 65 | 'description' => __( |
| 65 | 66 | 'Permanently deletes a WDesignKit cloud workspace by its workspace ID. Only the workspace container is removed — cloud templates, widgets, and snippets inside it are not deleted. Requires cloud login and confirm: true.', |
| 66 | - 'sprout-mcp', | |
| 67 | + 'wdesignkit', | |
| 67 | 68 | ), |
| 68 | 69 | 'category' => 'wdesignkit', |
| 69 | 70 | 'input_schema' => [ |
| 70 | 71 | 'type' => 'object', |
| @@ -90,10 +91,11 @@ | ||
| 90 | 91 | 'dry_run' => ['type' => 'boolean'], |
| 91 | 92 | ], |
| 92 | 93 | ], |
| 93 | 94 | 'execute_callback' => 'wdesignkit_mcp_delete_workspace', |
| 94 | - 'permission_callback' => 'sprout_mcp_permission_callback', | |
| 95 | + 'permission_callback' => 'wdesignkit_mcp_permission_callback', | |
| 95 | 96 | 'meta' => [ |
| 97 | + 'public' => true, | |
| 96 | 98 | 'show_in_rest' => true, |
| 97 | 99 | 'mcp' => ['public' => true], |
| 98 | 100 | 'annotations' => [ |
| 99 | 101 | 'instructions' => implode("\n", [ |
| @@ -108,12 +110,12 @@ | ||
| 108 | 110 | ], |
| 109 | 111 | ]); |
| 110 | 112 | |
| 111 | 113 | wp_register_ability('wdesignkit/update-workspace', [ |
| 112 | - 'label' => __('Update WDesignKit Workspace', 'sprout-mcp'), | |
| 114 | + 'label' => __('Update WDesignKit Workspace', 'wdesignkit'), | |
| 113 | 115 | 'description' => __( |
| 114 | 116 | 'Updates the title and/or primary builder of an existing WDesignKit cloud workspace. Covers both "Rename Workspace" and "Update Workspace Details". Requires cloud login.', |
| 115 | - 'sprout-mcp', | |
| 117 | + 'wdesignkit', | |
| 116 | 118 | ), |
| 117 | 119 | 'category' => 'wdesignkit', |
| 118 | 120 | 'input_schema' => [ |
| 119 | 121 | 'type' => 'object', |
| @@ -142,10 +144,11 @@ | ||
| 142 | 144 | 'response' => ['type' => ['object', 'array']], |
| 143 | 145 | ], |
| 144 | 146 | ], |
| 145 | 147 | 'execute_callback' => 'wdesignkit_mcp_update_workspace', |
| 146 | - 'permission_callback' => 'sprout_mcp_permission_callback', | |
| 148 | + 'permission_callback' => 'wdesignkit_mcp_permission_callback', | |
| 147 | 149 | 'meta' => [ |
| 150 | + 'public' => true, | |
| 148 | 151 | 'show_in_rest' => true, |
| 149 | 152 | 'mcp' => ['public' => true], |
| 150 | 153 | 'annotations' => [ |
| 151 | 154 | 'instructions' => implode("\n", [ |
| @@ -160,12 +163,12 @@ | ||
| 160 | 163 | ], |
| 161 | 164 | ]); |
| 162 | 165 | |
| 163 | 166 | wp_register_ability('wdesignkit/get-workspace-data', [ |
| 164 | - 'label' => __('Get WDesignKit Workspace Data', 'sprout-mcp'), | |
| 167 | + 'label' => __('Get WDesignKit Workspace Data', 'wdesignkit'), | |
| 165 | 168 | 'description' => __( |
| 166 | 169 | 'Retrieves full data for a specific WDesignKit cloud workspace including its templates, widgets, code snippets, member list, roles, and totals. Uses the v2 API. Requires cloud login.', |
| 167 | - 'sprout-mcp', | |
| 170 | + 'wdesignkit', | |
| 168 | 171 | ), |
| 169 | 172 | 'category' => 'wdesignkit', |
| 170 | 173 | 'input_schema' => [ |
| 171 | 174 | 'type' => 'object', |
| @@ -186,10 +189,11 @@ | ||
| 186 | 189 | 'response' => ['type' => ['object', 'array']], |
| 187 | 190 | ], |
| 188 | 191 | ], |
| 189 | 192 | 'execute_callback' => 'wdesignkit_mcp_get_workspace_data', |
| 190 | - 'permission_callback' => 'sprout_mcp_permission_callback', | |
| 193 | + 'permission_callback' => 'wdesignkit_mcp_permission_callback', | |
| 191 | 194 | 'meta' => [ |
| 195 | + 'public' => true, | |
| 192 | 196 | 'show_in_rest' => true, |
| 193 | 197 | 'mcp' => ['public' => true], |
| 194 | 198 | 'annotations' => [ |
| 195 | 199 | 'instructions' => implode("\n", [ |
| @@ -205,12 +209,12 @@ | ||
| 205 | 209 | ], |
| 206 | 210 | ]); |
| 207 | 211 | |
| 208 | 212 | wp_register_ability('wdesignkit/get-shared-with-me', [ |
| 209 | - 'label' => __('Get WDesignKit Shared With Me', 'sprout-mcp'), | |
| 213 | + 'label' => __('Get WDesignKit Shared With Me', 'wdesignkit'), | |
| 210 | 214 | 'description' => __( |
| 211 | 215 | 'Lists templates and/or widgets that have been shared with the current user through WDesignKit cloud workspace collaboration. Supports type and builder filtering with pagination. Requires cloud login.', |
| 212 | - 'sprout-mcp', | |
| 216 | + 'wdesignkit', | |
| 213 | 217 | ), |
| 214 | 218 | 'category' => 'wdesignkit', |
| 215 | 219 | 'input_schema' => [ |
| 216 | 220 | 'type' => 'object', |
| @@ -245,10 +249,11 @@ | ||
| 245 | 249 | 'response' => ['type' => ['object', 'array']], |
| 246 | 250 | ], |
| 247 | 251 | ], |
| 248 | 252 | 'execute_callback' => 'wdesignkit_mcp_get_shared_with_me', |
| 249 | - 'permission_callback' => 'sprout_mcp_permission_callback', | |
| 253 | + 'permission_callback' => 'wdesignkit_mcp_permission_callback', | |
| 250 | 254 | 'meta' => [ |
| 255 | + 'public' => true, | |
| 251 | 256 | 'show_in_rest' => true, |
| 252 | 257 | 'mcp' => ['public' => true], |
| 253 | 258 | 'annotations' => [ |
| 254 | 259 | 'instructions' => implode("\n", [ |