Files
piratepoet/mailpoet/lib/Form/PreviewWidget.php
2024-08-29 17:23:34 +02:00

30 lines
629 B
PHP

<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
namespace MailPoet\Form;
class PreviewWidget extends \WP_Widget {
/** @var string */
private $formHtml;
public function __construct(
$formHtml
) {
$this->formHtml = $formHtml;
parent::__construct(
'mailpoet_form_preview',
'Dummy form form preview',
[]
);
}
/**
* Output the widget itself.
*/
public function widget($args, $instance = null) {
// We control the html
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $this->formHtml;
}
}