PluginProbe
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More / 2.6.1
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More v2.6.1
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.10 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 47 releases
← All changes | classes/Controllers/Compatibility/QueryMonitor.php +9 -4 2.0.122.6.1 View file →
@@ -24,14 +24,19 @@
24 24 *
25 25 * @return void
26 26 */
27 27 public function init() {
28 - if ( ! class_exists( 'QueryMonitor' ) ) {
29 - return;
30 - }
31 -
32 28 $this->register_collector();
33 29 add_filter( 'qm/outputter/html', [ $this, 'register_output_html' ], 10 );
30 + }
31 +
32 + /**
33 + * Check if controller is enabled.
34 + *
35 + * @return bool
36 + */
37 + public function controller_enabled() {
38 + return class_exists( 'QueryMonitor' );
34 39 }
35 40
36 41 /**
37 42 * Register collector.