PluginProbe
The Innovative Form Builder – IvyForms / 1.5.1
The Innovative Form Builder – IvyForms v1.5.1
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/Entry/DeleteEntryController.php +3 -10 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\Entry;
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;
@@ -59,17 +54,15 @@
59 54 throw new InvalidArgumentException(
60 55 BackendStrings::getExceptionStrings()['entry_id_required']
61 56 );
62 57 }
63 -
64 -
65 58 $id = Sanitizer::sanitizeId($data->get_param('id')) ;
66 59
67 60 // Bulk delete all entry fields for the entry
68 - $this->entryService->deleteEntryFieldsByEntryIds([$id]);
61 + $this->entryService->getDeletionManager()->deleteEntryFieldsByEntryIds([$id]);
69 62
70 63 // Delete the entry itself
71 - $this->entryService->deleteEntry($id);
64 + $this->entryService->getDeletionManager()->deleteEntry($id);
72 65
73 66 // Return a success response
74 67 return new WP_REST_Response([
75 68 'message' => BackendStrings::getCommonStrings()['ok'],