| @@ -25,8 +25,17 @@ | ||
| 25 | 25 | add_filter( 'content_control/protection_is_disabled', [ $this, 'protection_is_disabled' ] ); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | + * Check if controller is enabled. | |
| 30 | + * | |
| 31 | + * @return bool | |
| 32 | + */ | |
| 33 | + public function controller_enabled() { | |
| 34 | + return class_exists( '\Elementor\Plugin' ) || did_action( 'elementor/loaded' ); | |
| 35 | + } | |
| 36 | + | |
| 37 | + /** | |
| 29 | 38 | * Conditionally disable Content Control for Elementor builder. |
| 30 | 39 | * |
| 31 | 40 | * @param boolean $is_disabled Whether protection is disabled. |
| 32 | 41 | * @return boolean |