PluginProbe
WebberZone Top 10 — Popular Posts / 4.5.2
WebberZone Top 10 — Popular Posts v4.5.2
4.5.2 4.5.1 4.5.0 4.4.3 4.4.2 4.4.1 4.4.0 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 trunk 1.0 1.0.1 1.1 1.2 1.3 1.4 1.4.1 1.5 1.5.1 1.5.2 1.5.3 1.6 All 118 releases
← All changes | includes/class-main.php +11 -6 4.3.1 → 4.5.2 View file →
@@ -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.