elf::elementor()->assets_loader->add_assets( $assets );
}
}
private function is_assets_loader_exist() {
return ! ! self::elementor()->assets_loader;
}
/**
* Plugin constructor.
*/
private function __construct() {
spl_autoload_register( [ $this, 'autoload' ] );
Compatibility::register_actions();
new Connect\Manager();
$this->setup_hooks();
$this->editor = new Editor();
$this->preview = new Preview();
$this->app = new App();
$this->license_admin = new License\Admin();
$this->php_api = new PHP_Api();
if ( is_user_logged_in() ) {
$this->integrations = new Integrations_Manager(); // TODO: This one is safe to move out of the condition.
$this->notifications = new Notifications_Manager();
}
if ( is_admin() ) {
$this->admin = new Admin();
$this->license_admin->register_actions();
}
// The `Updater` class is responsible for adding some updates related filters, including auto updates, and since
// WP crons don't run on admin mode, it should not depend on it.
$this->updater = new Updater();
}
private function get_assets_suffix() {
return defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
}
private function get_frontend_file( $frontend_file_name ) {
$template_file_path = self::get_responsive_templates_path() . $frontend_file_name;
return self::elementor()->frontend->get_frontend_file( $frontend_file_name, 'custom-pro-', $template_file_path );
}
final public static function get_title() {
return esc_html__( 'Elementor Pro', 'elementor-pro' );
}
}
if ( ! defined( 'ELEMENTOR_PRO_TESTS' ) ) {
// In tests we run the instance manually.
Plugin::instance();
}