Refactor renderers to use templates

This commit is contained in:
Mike Jolley
2024-03-22 15:50:08 +00:00
committed by Rostislav Wolný
parent 888be622e2
commit b4acac7c52
5 changed files with 92 additions and 182 deletions

View File

@@ -0,0 +1,19 @@
<?php declare(strict_types = 1);
namespace MailPoet\EmailEditor\Engine\Renderer\ContentRenderer;
use WP_Block_Parser;
class BlocksParser extends WP_Block_Parser {
/**
* List of parsed blocks
*
* @var \WP_Block_Parser_Block[]
*/
public $output;
public function parse($document) {
parent::parse($document);
return apply_filters('mailpoet_blocks_renderer_parsed_blocks', $this->output);
}
}