woocommerce
/
packages
/
email-editor
/
src
/
Engine
/
Renderer
/
ContentRenderer
/
class-blocks-parser.php
Layout
1 month ago
Postprocessors
9 months ago
Preprocessors
1 month ago
class-block-renderer.php
11 months ago
class-blocks-parser.php
1 year ago
class-content-renderer.php
1 month ago
class-preset-variable-resolver.php
2 months ago
class-process-manager.php
1 month ago
class-rendering-context.php
1 month ago
content.css
1 year ago
class-blocks-parser.php
35 lines
| 1 | <?php |
| 2 | /** |
| 3 | * This file is part of the WooCommerce Email Editor package. |
| 4 | * |
| 5 | * @package Automattic\WooCommerce\EmailEditor |
| 6 | */ |
| 7 | |
| 8 | declare(strict_types = 1); |
| 9 | namespace Automattic\WooCommerce\EmailEditor\Engine\Renderer\ContentRenderer; |
| 10 | |
| 11 | use WP_Block_Parser; |
| 12 | |
| 13 | /** |
| 14 | * Class Blocks_Parser |
| 15 | */ |
| 16 | class Blocks_Parser extends WP_Block_Parser { |
| 17 | /** |
| 18 | * List of parsed blocks |
| 19 | * |
| 20 | * @var \WP_Block_Parser_Block[] |
| 21 | */ |
| 22 | public $output; |
| 23 | |
| 24 | /** |
| 25 | * Parse the blocks from the document |
| 26 | * |
| 27 | * @param string $document Document to parse. |
| 28 | * @return array[] |
| 29 | */ |
| 30 | public function parse( $document ) { |
| 31 | parent::parse( $document ); |
| 32 | return apply_filters( 'woocommerce_email_blocks_renderer_parsed_blocks', $this->output ); |
| 33 | } |
| 34 | } |
| 35 |