addCptSupport(); $this->initComponents(); /* * Elementor init. * * Fires on Elementor init, after Elementor has finished loading but * before any headers are sent. * * @since 1.0.0 */ do_action('elementor/init'); \Hook::exec('actionCreativeElementsInit'); } /** * Get install time. * * Retrieve the time when Elementor was installed. * * @since 2.6.0 * @static * * @return int Unix timestamp when Elementor was installed */ public function getInstallTime() { $installed_time = get_option('_elementor_installed_time'); if (!$installed_time) { $installed_time = time(); update_option('_elementor_installed_time', $installed_time); } return $installed_time; } // public function onRestApiInit(); /** * Init components. * * Initialize Elementor components. Register actions, run setting manager, * initialize all the components that run elementor, and if in admin page * initialize admin components. * * @since 1.0.0 */ private function initComponents() { // $this->inspector = new Inspector(); // $this->debugger = $this->inspector; SettingsManager::run(); $this->db = new DB(); $this->controls_manager = new ControlsManager(); $this->documents = new DocumentsManager(); $this->kits_manager = new KitsManager(); $this->schemes_manager = new SchemesManager(); $this->elements_manager = new ElementsManager(); $this->widgets_manager = new WidgetsManager(); $this->skins_manager = new SkinsManager(); $this->files_manager = new FilesManager(); $this->assets_manager = new AssetsManager(); $this->icons_manager = new IconsManager(); // $this->settings = new Settings(); // $this->tools = new Tools(); $this->editor = new Editor(); $this->preview = new Preview(); $this->frontend = new Frontend(); $this->templates_manager = new TemplateLibraryXManager(); // $this->maintenance_mode = new MaintenanceMode(); $this->dynamic_tags = new DynamicTagsManager(); $this->modules_manager = new ModulesManager(); // $this->role_manager = new RoleManager(); // $this->system_info = new SystemInfoModule(); $this->revisions_manager = new RevisionsManager(); // $this->images_manager = new ImagesManager(); User::init(); Api::init(); // Tracker::init(); // $this->upgrade = new Core\Upgrade\Manager(); if (is_admin()) { $this->heartbeat = new Heartbeat(); // $this->wordpress_widgets_manager = new WordPressWidgetsManager(); // $this->admin = new Admin(); // $this->beta_testers = new BetaTesters(); $this->initCommon(); } } /** * @since 2.3.0 */ public function initCommon() { $this->common = new CommonApp(); $this->common->initComponents(); } // private function addCptSupport() /** * Register autoloader. * * Elementor autoloader loads all the classes needed to run the plugin. * * @since 1.6.0 */ private function registerAutoloader() { require_once _CE_PATH_ . '/includes/autoloader.php'; Autoloader::run(); } /** * Plugin constructor. * * Initializing Elementor plugin. * * @since 1.0.0 */ private function __construct() { $this->registerAutoloader(); // $this->logger = LogManager::instance(); // Maintenance::init(); // Compatibility::registerActions(); add_action('init', [$this, 'init'], 0); // add_action('rest_api_init', [$this, 'onRestApiInit']); } final public static function getTitle() { return __('Creative Elements'); } }