| @@ -57,11 +57,11 @@ | ||
| 57 | 57 | * Blocks. |
| 58 | 58 | * |
| 59 | 59 | * @since 3.3.0 |
| 60 | 60 | * |
| 61 | - * @var Frontend\Blocks\Blocks | |
| 61 | + * @var Frontend\Blocks\Blocks|null | |
| 62 | 62 | */ |
| 63 | - public Frontend\Blocks\Blocks $blocks; | |
| 63 | + public ?Frontend\Blocks\Blocks $blocks = null; | |
| 64 | 64 | |
| 65 | 65 | /** |
| 66 | 66 | * Counter. |
| 67 | 67 | * |
| @@ -84,11 +84,11 @@ | ||
| 84 | 84 | * Feed. |
| 85 | 85 | * |
| 86 | 86 | * @since 3.3.0 |
| 87 | 87 | * |
| 88 | - * @var Frontend\Feed | |
| 88 | + * @var Frontend\Feed|null | |
| 89 | 89 | */ |
| 90 | - public Frontend\Feed $feed; | |
| 90 | + public ?Frontend\Feed $feed = null; | |
| 91 | 91 | |
| 92 | 92 | /** |
| 93 | 93 | * Styles. |
| 94 | 94 | * |
| @@ -160,11 +160,16 @@ | ||
| 160 | 160 | $this->styles = new Frontend\Styles_Handler(); |
| 161 | 161 | $this->counter = new Counter(); |
| 162 | 162 | $this->tracker = new Tracker(); |
| 163 | 163 | $this->shortcodes = new Frontend\Shortcodes(); |
| 164 | - $this->blocks = new Frontend\Blocks\Blocks(); | |
| 165 | - $this->feed = new Frontend\Feed(); | |
| 166 | 164 | $this->cron = new Cron(); |
| 165 | + | |
| 166 | + if ( Feature_Manager::is_enabled( 'blocks' ) ) { | |
| 167 | + $this->blocks = new Frontend\Blocks\Blocks(); | |
| 168 | + } | |
| 169 | + if ( Feature_Manager::is_enabled( 'feed' ) ) { | |
| 170 | + $this->feed = new Frontend\Feed(); | |
| 171 | + } | |
| 167 | 172 | |
| 168 | 173 | new Hook_Loader(); |
| 169 | 174 | |
| 170 | 175 | // Initialize admin on init action to ensure translations are loaded. |