feat(widgets): complete phase 3 atomic integration
This commit is contained in:
@@ -112,49 +112,6 @@ class ImportExportController extends ControllerBase {
|
||||
'permission_callback' => [$this, 'check_permission'],
|
||||
]);
|
||||
|
||||
// ── Widget Template Management ──
|
||||
|
||||
// Export current widget configuration
|
||||
register_rest_route(self::API_NAMESPACE, '/widgets/export', [
|
||||
'methods' => 'GET',
|
||||
'callback' => [$this, 'export_widgets'],
|
||||
'permission_callback' => [$this, 'check_permission'],
|
||||
]);
|
||||
|
||||
// Import widget configuration
|
||||
register_rest_route(self::API_NAMESPACE, '/widgets/import', [
|
||||
'methods' => 'POST',
|
||||
'callback' => [$this, 'import_widgets'],
|
||||
'permission_callback' => [$this, 'check_permission'],
|
||||
]);
|
||||
|
||||
// List saved widget templates
|
||||
register_rest_route(self::API_NAMESPACE, '/widgets/templates', [
|
||||
'methods' => 'GET',
|
||||
'callback' => [$this, 'list_widget_templates'],
|
||||
'permission_callback' => [$this, 'check_permission'],
|
||||
]);
|
||||
|
||||
// Save current layout as a named template
|
||||
register_rest_route(self::API_NAMESPACE, '/widgets/templates', [
|
||||
'methods' => 'POST',
|
||||
'callback' => [$this, 'save_widget_template'],
|
||||
'permission_callback' => [$this, 'check_permission'],
|
||||
]);
|
||||
|
||||
// Apply a saved template
|
||||
register_rest_route(self::API_NAMESPACE, '/widgets/templates/(?P<id>\d+)/apply', [
|
||||
'methods' => 'POST',
|
||||
'callback' => [$this, 'apply_widget_template'],
|
||||
'permission_callback' => [$this, 'check_permission'],
|
||||
]);
|
||||
|
||||
// Delete a saved template
|
||||
register_rest_route(self::API_NAMESPACE, '/widgets/templates/(?P<id>\d+)', [
|
||||
'methods' => 'DELETE',
|
||||
'callback' => [$this, 'delete_widget_template'],
|
||||
'permission_callback' => [$this, 'check_permission'],
|
||||
]);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
Reference in New Issue
Block a user