| 1 |
<?php |
| 2 |
/** |
| 3 |
* Builder Plugin Compatibility Code |
| 4 |
* |
| 5 |
* @package Themify_Builder |
| 6 |
* @subpackage Themify_Builder/classes |
| 7 |
*/ |
| 8 |
|
| 9 |
/** |
| 10 |
* Tutor LMS |
| 11 |
* @link https://www.themeum.com/product/tutor-lms/ |
| 12 |
*/ |
| 13 |
class Themify_Builder_Plugin_Compat_Tutor { |
| 14 |
|
| 15 |
static function init() { |
| 16 |
add_action( 'template_redirect', array( __CLASS__, 'template_redirect' ) ); |
| 17 |
} |
| 18 |
|
| 19 |
/** |
| 20 |
* Early call the wp_enqueue_editor hook to prevent Tutor from running |
| 21 |
* wp_enqueue_editor() running in Builder's frontend editor page. |
| 22 |
*/ |
| 23 |
public static function template_redirect() { |
| 24 |
if ( Themify_Builder_Model::is_front_builder_activate() ) { |
| 25 |
remove_all_filters( 'wp_enqueue_editor' ); |
| 26 |
do_action( 'wp_enqueue_editor' ); |
| 27 |
} |
| 28 |
} |
| 29 |
} |