/** * Visual Composer. * * @since 4.2 * @access public * * @return Vc_Base */ public function vc() { if (!isset($this->factory['vc'])) { do_action('vc_before_init_vc'); require_once $this->path('CORE_DIR', 'class-vc-base.php'); $vc = new Vc_Base(); // DI Set template new modal editor. require_once $this->path('EDITORS_DIR', 'popups/class-vc-templates-panel-editor.php'); $vc->setTemplatesPanelEditor(new Vc_Templates_Panel_Editor()); // DI Set edit form require_once $this->path('EDITORS_DIR', 'popups/class-vc-shortcode-edit-form.php'); $vc->setEditForm(new Vc_Shortcode_Edit_Form()); $this->factory['vc'] = $vc; do_action('vc_after_init_vc'); } return $this->factory['vc']; }
/** * Visual Composer. * * @since 4.2 * @access public * * @return Vc_Base */ public function vc() { if (!isset($this->factory['vc'])) { do_action('vc_before_init_vc'); require_once $this->path('CORE_DIR', 'class-vc-base.php'); $vc = new Vc_Base(); // DI Set template editor. @deprecated and will be removed require_once $this->path('EDITORS_DIR', 'popups/class-vc-templates-editor.php'); $vc->setTemplatesEditor(new Vc_Templates_Editor()); // DI Set template new modal editor. require_once $this->path('EDITORS_DIR', 'popups/class-vc-templates-panel-editor.php'); $vc->setTemplatesPanelEditor(new Vc_Templates_Panel_Editor()); // DI Set edit form require_once $this->path('EDITORS_DIR', 'popups/class-vc-shortcode-edit-form.php'); $vc->setEditForm(new Vc_Shortcode_Edit_Form()); // DI for third-party plugins manager. require_once $this->path('VENDORS_DIR', 'class-vc-vendors-manager.php'); $vc->setVendorsManager(new Vc_Vendors_Manager()); $this->factory['vc'] = $vc; do_action('vc_after_init_vc'); } return $this->factory['vc']; }