| @@ -1,0 +1,23 @@ | ||
| 1 | +<?php | |
| 2 | +namespace ABlocks; | |
| 3 | + | |
| 4 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 5 | + exit; // Exit if accessed directly. | |
| 6 | +} | |
| 7 | + | |
| 8 | +class Frontend { | |
| 9 | + public static function init() { | |
| 10 | + $self = new self(); | |
| 11 | + $self->dispatch_hooks(); | |
| 12 | + } | |
| 13 | + | |
| 14 | + public function dispatch_hooks() { | |
| 15 | + Frontend\Template::init(); | |
| 16 | + Frontend\Link::init(); | |
| 17 | + Frontend\LinkPassthrough::init(); | |
| 18 | + if ( ! is_admin() || defined( 'DOING_AJAX' ) && DOING_AJAX ) { | |
| 19 | + add_filter( 'render_block', [ Frontend\DynamicContent\Interpreter::class, 'init' ], 10, 3 ); | |
| 20 | + } | |
| 21 | + } | |
| 22 | + | |
| 23 | +} | |