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/Notification/GetNotificationsController.php +0 -7 0.2 → 1.5.1 View file →
@@ -1,13 +1,8 @@
1 1 <?php
2 2
3 3 namespace IvyForms\Controllers\Notification;
4 4
5 -// phpcs:disable PSR1.Files.SideEffects
6 -if (!defined('ABSPATH')) {
7 - exit; // Exit if accessed directly
8 -}
9 -
10 5 use IvyForms\Common\Exceptions\ForbiddenException;
11 6 use IvyForms\Common\Exceptions\InvalidArgumentException;
12 7 use IvyForms\Common\Exceptions\NotFoundException;
13 8 use IvyForms\Common\Sanitizer\Sanitizer;
@@ -42,10 +37,8 @@
42 37 {
43 38 // Verify the nonce
44 39 Sanitizer::verifyNonce($data->get_header('X-WP-Nonce'));
45 40 $formId = Sanitizer::sanitizeId($data->get_param('id'));
46 -
47 -
48 41 // TODO: Update this logic to only require the form ID after templates.
49 42 $notificationsArr = $formId
50 43 ? $this->notificationService->getNotificationsByFormId((int) $formId)
51 44 : $this->notificationService->getAllNotifications();