_init_hooks(); } /** * Gets the instance of the class. */ public static function init() { if ( null === self::$instance ) { self::$instance = new self(); } return self::$instance; } /** * Hook methods to WordPress action and filter. * * @return void */ private function _init_hooks() { // Load plugin.php for frontend usage. if ( ! function_exists( 'wp_get_theme' ) ) { include_once ABSPATH . 'wp-admin/includes/theme.php'; } $current_theme = wp_get_theme(); $current_theme_name = $current_theme->get( 'TextDomain' ); $theme_compat_url = apply_filters( "et_builder_theme_compat_path_{$current_theme_name}", ET_BUILDER_DIR . "theme-compat/{$current_theme_name}.php", $current_theme_name ); if ( file_exists( $theme_compat_url ) ) { require_once $theme_compat_url; } } } ET_Builder_Theme_Compat_Handler::init();