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