Block
1 week ago
Listing
1 month ago
RestApi
1 month ago
Templates
2 years ago
Util
2 months ago
ApiDataSanitizer.php
2 weeks ago
AssetsController.php
2 months ago
BlockStylesRenderer.php
3 years ago
BlockWrapperRenderer.php
3 years ago
BlocksRenderer.php
1 week ago
DisplayFormInWPContent.php
2 months ago
FormHtmlSanitizer.php
1 month ago
FormMessageController.php
4 years ago
FormSaveController.php
1 year ago
FormsRepository.php
1 year ago
PreviewPage.php
2 months ago
PreviewWidget.php
1 year ago
Renderer.php
2 months ago
Widget.php
2 months ago
index.php
3 years ago
PreviewWidget.php
33 lines
| 1 | <?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing |
| 2 | |
| 3 | namespace MailPoet\Form; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | class PreviewWidget extends \WP_Widget { |
| 9 | |
| 10 | /** @var string */ |
| 11 | private $formHtml; |
| 12 | |
| 13 | public function __construct( |
| 14 | $formHtml |
| 15 | ) { |
| 16 | $this->formHtml = $formHtml; |
| 17 | parent::__construct( |
| 18 | 'mailpoet_form_preview', |
| 19 | 'Dummy form form preview', |
| 20 | [] |
| 21 | ); |
| 22 | } |
| 23 | |
| 24 | /** |
| 25 | * Output the widget itself. |
| 26 | */ |
| 27 | public function widget($args, $instance = null) { |
| 28 | // We control the html |
| 29 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 30 | echo $this->formHtml; |
| 31 | } |
| 32 | } |
| 33 |