| @@ -1,8 +1,10 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace AcyMailing\WpInit; |
| 4 | 4 | |
| 5 | +defined('ABSPATH') || die('Restricted Access'); | |
| 6 | + | |
| 5 | 7 | use AcyMailing\Classes\FormClass; |
| 6 | 8 | |
| 7 | 9 | class Forms |
| 8 | 10 | { |
| @@ -35,15 +37,20 @@ | ||
| 35 | 37 | $this->formToDisplay[] = $formClass->renderForm($form); |
| 36 | 38 | } |
| 37 | 39 | } |
| 38 | 40 | |
| 39 | - if (!empty($this->formToDisplay)) acym_initModule(); | |
| 41 | + if (!empty($this->formToDisplay)) { | |
| 42 | + acym_initModule(); | |
| 43 | + } | |
| 40 | 44 | } |
| 41 | 45 | |
| 42 | 46 | public function displayForms() |
| 43 | 47 | { |
| 44 | - if (empty($this->formToDisplay)) return; | |
| 48 | + if (empty($this->formToDisplay)) { | |
| 49 | + return; | |
| 50 | + } | |
| 45 | 51 | |
| 52 | + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Generated in partial folder "forms", escaped there. | |
| 46 | 53 | echo implode('', $this->formToDisplay); |
| 47 | 54 | } |
| 48 | 55 | |
| 49 | 56 | public function registerShortcodes() |