| 1 |
<?php |
| 2 |
/** |
| 3 |
* Builder Plugin Compatibility Code |
| 4 |
* |
| 5 |
* @package Themify_Builder |
| 6 |
* @subpackage Themify_Builder/classes |
| 7 |
*/ |
| 8 |
|
| 9 |
/** |
| 10 |
* Thrive Architect |
| 11 |
* @link https://thrivethemes.com/architect/ |
| 12 |
*/ |
| 13 |
class Themify_Builder_Plugin_Compat_Thrive { |
| 14 |
|
| 15 |
static function init() { |
| 16 |
add_filter( 'themify_builder_is_frontend_editor', array( __CLASS__, 'thrive_compat' ) ); |
| 17 |
} |
| 18 |
|
| 19 |
/** |
| 20 |
* Compatibility with Thrive Builder and Thrive Leads plugins |
| 21 |
* Disables Builder's frontend editor when Thrive editor is active |
| 22 |
*/ |
| 23 |
public static function thrive_compat(bool $enabled ):bool { |
| 24 |
return isset( $_GET['tve'] ) && $_GET['tve'] === 'true' && function_exists( 'tve_editor_content' ) ? false : $enabled; |
| 25 |
} |
| 26 |
} |