PluginProbe
The Innovative Form Builder – IvyForms / 1.5
The Innovative Form Builder – IvyForms v1.5
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
← All changes | backend/src/Controllers/Confirmation/GetConfirmationsController.php +5 -9 0.1.2 → 1.5 View file →
@@ -1,18 +1,13 @@
1 1 <?php
2 2
3 3 /**
4 - * @copyright © TMS-Plugins. All rights.
4 + * @copyright © Melograno Venture Studio. All rights.
5 5 * @licence See COPYING.md for license details.
6 6 */
7 7
8 8 namespace IvyForms\Controllers\Confirmation;
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\Exceptions\InvalidArgumentException;
17 12 use IvyForms\Common\Exceptions\NotFoundException;
18 13 use IvyForms\Common\Sanitizer\Sanitizer;
@@ -17,8 +12,9 @@
17 12 use IvyForms\Common\Exceptions\NotFoundException;
18 13 use IvyForms\Common\Sanitizer\Sanitizer;
19 14 use IvyForms\Controllers\Controller;
20 15 use IvyForms\Services\Confirmation\ConfirmationService;
16 +use IvyForms\Services\Translations\BackendStrings;
21 17 use WP_REST_Request;
22 18 use WP_REST_Response;
23 19
24 20 /**
@@ -23,9 +19,9 @@
23 19
24 20 /**
25 21 * Class GetConfirmationsController
26 22 *
27 - * @package IvyForms\Application\Controllers\Confirmation
23 + * @package IvyForms\Controllers\Confirmation
28 24 */
29 25 class GetConfirmationsController extends Controller
30 26 {
31 27 private ConfirmationService $confirmationService;
@@ -59,9 +55,9 @@
59 55 $confirmations[] = $confirmation->toArray();
60 56 }
61 57
62 58 return new WP_REST_Response([
63 - 'message' => 'OK',
64 - $confirmations
59 + 'message' => BackendStrings::getCommonStrings()['ok'],
60 + 'data' => $confirmations,
65 61 ], 200);
66 62 }
67 63 }