← All changes
|
backend/src/Controllers/Template/GetTemplatesController.php
+2
-7
0.4
→
1.5.1
View file →
| @@ -1,18 +1,13 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * @copyright © TMS-Plugins. All rights reserved. | |
| 4 | + * @copyright © Melograno Venture Studio. All rights reserved. | |
| 5 | 5 | * @licence See COPYING.md for license details. |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | namespace IvyForms\Controllers\Template; |
| 9 | 9 | |
| 10 | -// phpcs:disable PSR1.Files.SideEffects | |
| 11 | -if (!defined('ABSPATH')) { | |
| 12 | - exit; // Exit if accessed directly | |
| 13 | -} | |
| 14 | - | |
| 15 | 10 | use IvyForms\Common\Exceptions\ForbiddenException; |
| 16 | 11 | use IvyForms\Common\Sanitizer\Sanitizer; |
| 17 | 12 | use IvyForms\Controllers\Controller; |
| 18 | 13 | use IvyForms\Services\Template\TemplateService; |
| @@ -42,9 +37,9 @@ | ||
| 42 | 37 | { |
| 43 | 38 | // Verify the nonce |
| 44 | 39 | Sanitizer::verifyNonce($request->get_header('X-WP-Nonce')); |
| 45 | 40 | |
| 46 | - $templates = $this->templateService->getAllTemplates(); | |
| 41 | + $templates = $this->templateService->getAllTemplateMetas(); | |
| 47 | 42 | $categories = $this->templateService->getTemplateCategories(); |
| 48 | 43 | |
| 49 | 44 | return new WP_REST_Response([ |
| 50 | 45 | 'success' => true, |