Нет описания

PreviewWidget.php 472B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace MailPoet\Form;
  3. if (!defined('ABSPATH')) exit;
  4. class PreviewWidget extends \WP_Widget {
  5. /** @var string */
  6. private $formHtml;
  7. public function __construct(
  8. $formHtml
  9. ) {
  10. $this->formHtml = $formHtml;
  11. parent::__construct(
  12. 'mailpoet_form_preview',
  13. 'Dummy form form preview',
  14. []
  15. );
  16. }
  17. /**
  18. * Output the widget itself.
  19. */
  20. public function widget($args, $instance = null) {
  21. echo $this->formHtml;
  22. }
  23. }