| 1 |
<?php |
| 2 |
/** |
| 3 |
* Builder Plugin Compatibility Code |
| 4 |
* |
| 5 |
* @package Themify_Builder |
| 6 |
* @subpackage Themify_Builder/classes |
| 7 |
*/ |
| 8 |
|
| 9 |
/** |
| 10 |
* Smart Cookie Kit |
| 11 |
* @link https://wordpress.org/plugins/smart-cookie-kit/ |
| 12 |
*/ |
| 13 |
class Themify_Builder_Plugin_Compat_SmartCookie { |
| 14 |
|
| 15 |
static function init() { |
| 16 |
add_action( 'template_redirect', array( __CLASS__, 'template_redirect' ) ); |
| 17 |
} |
| 18 |
|
| 19 |
public static function template_redirect():void { |
| 20 |
if ( Themify_Builder_Model::is_front_builder_activate() && class_exists( 'NMOD_SmartCookieKit_Frontend',false ) ) { |
| 21 |
remove_action( 'wp_enqueue_scripts', array( NMOD_SmartCookieKit_Frontend::init(), 'buffer_set' ), 0 ); |
| 22 |
remove_action( 'wp_print_footer_scripts', array( NMOD_SmartCookieKit_Frontend::init(), 'buffer_unset' ), 10 ); |
| 23 |
remove_action( 'wp_enqueue_scripts', array( NMOD_SmartCookieKit_Frontend::init(), 'enqueue_scripts' ), 1 ); |
| 24 |
remove_action( 'wp_print_footer_scripts', array( NMOD_SmartCookieKit_Frontend::init(), 'run_fontend_kit' ), 99999 ); |
| 25 |
} |
| 26 |
} |
| 27 |
} |