PATH:
home
/
lab2454c
/
equitablegold.com
/
wp-content
/
plugins
/
unlimited-elements-for-elementor
/
inc_php
<?php /** * @package Unlimited Elements * @author unlimited-elements.com * @copyright (C) 2021 Unlimited Elements, All Rights Reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html * */ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access'); class UniteCreatorAddonConfig extends HtmlOutputBaseUC{ private $startWithAddon = false; private $isPreviewMode = false; private $startAddon; private $selectedTab = null; private $isSourceAddon = false; private $isFontsPanelEnabled = true; /** * construct the object */ public function __construct(){ } /** * validate start addon */ private function valdiateStartAddon(){ if($this->startWithAddon == false) UniteFunctionsUC::throwError("No start addon found"); } /** * get preview html */ private function getHtmlPreview(){ $html = ""; //preview $html .= self::TAB2."<div class='uc-addon-config-preview' style='display:none'>".self::BR; $html .= self::TAB3."<div class='uc-addon-config-preview-title'>Preview".self::BR; $html .= self::TAB3."</div>".self::BR; $html .= self::TAB3."<div class='uc-preview-content'>".self::BR; $html .= self::TAB4."<iframe class='uc-preview-iframe'>".self::BR; $html .= self::TAB4."</iframe>".self::BR; $html .= self::TAB3."</div>".self::BR; $html .= self::TAB2."</div>".self::BR; return($html); } /** * get item settings html */ private function getHtmlSettings($putMode = false){ $html = ""; $html .= self::TAB3."<div class='uc-addon-config-settings unite-settings'>".self::BR; if($putMode == true){ echo UniteProviderFunctionsUC::escCombinedHtml($html); $html = ""; } if($this->startWithAddon == true){ $params = array(); if($this->isSourceAddon == true) $params["source"] = "addon"; if($this->isFontsPanelEnabled == false) $params["disable_fonts"] = true; if($putMode == true) $this->startAddon->putHtmlConfig(false,$params); else{ $htmlConfig = $this->startAddon->getHtmlConfig(false,false,$params); $html .= $htmlConfig; } } $html .= self::TAB3."</div>".self::BR; //settings if($putMode == true) echo UniteProviderFunctionsUC::escCombinedHtml($html); else return($html); } private function a___________OTHERS____________(){} /** * get tab html */ private function getHtmlTab($name, $text){ $selectedClass = ""; if(empty($this->selectedTab)){ $this->selectedTab = $name; $selectedClass = " uc-tab-selected"; } $html = self::TAB3."<a href='javascript:void(0)' data-name='{$name}' onfocus='this.blur()' class='uc-addon-config-tab {$selectedClass}'>".$text."</a>".self::BR; return($html); } /** * put html frame of the config */ public function getHtmlFrame($putMode = false){ $title = esc_html__("Addon Title", "unlimited-elements-for-elementor"); $this->valdiateStartAddon(); $addHtml = ""; $title = $this->startAddon->getTitle(true); $title .= " - ".esc_html__("Config", "unlimited-elements-for-elementor"); $titleSmall = $this->startAddon->getTitle(true); $addonName = $this->startAddon->getNameByType(); $addonID = $this->startAddon->getID(); $addonType = $this->startAddon->getType(); $enableFontsPanel = true; $options = $this->startAddon->getOptions(); $urlIcon = $this->startAddon->getUrlIcon(); $options["title"] = $this->startAddon->getTitle(); $options["url_icon"] = $urlIcon; $options["addon_name"] = $addonName; $options["addon_id"] = $addonID; $options["addon_type"] = $addonType; $options["admin_labels"] = $this->startAddon->getAdminLabels(); $strOptions = UniteFunctionsUC::jsonEncodeForHtmlData($options,"options"); $addonName = esc_attr($addonName); $addonType = esc_attr($addonType); $addHtml .= " data-name=\"{$addonName}\" data-addontype=\"{$addonType}\" {$strOptions} "; $html = ""; //settings $html .= self::TAB. "<div id='uc_addon_config' class='uc-addon-config' {$addHtml}>".self::BR; //set preview style $styleConfigTable = ""; if($this->isPreviewMode == true) $styleConfigTable = "style='display:none'"; $html .= self::TAB."<div class='uc-addon-config-table'>".self::BR; //put settings if($putMode == true){ echo UniteProviderFunctionsUC::escCombinedHtml($html); $html = ""; $this->getHtmlSettings(true); }else{ $html .= $this->getHtmlSettings(); } $html .= self::TAB."</div>"; //end config table //end preview table $html .= $this->getHtmlPreview(); $html .= self::TAB."</div>".self::BR; //main wrapper if($putMode == true) echo UniteProviderFunctionsUC::escCombinedHtml($html); else return($html); } /** * put html frame */ public function putHtmlFrame(){ $this->getHtmlFrame(true); } /** * set to start with preview */ public function startWithPreview($isPreview){ $this->isPreviewMode = $isPreview; } /** * set addon as image source */ public function setSourceAddon(){ $this->isSourceAddon = true; } /** * set start addon */ public function setStartAddon(UniteCreatorAddon $objAddon){ $this->startWithAddon = true; UniteFunctionsUC::validateNotEmpty($objAddon, "addon"); $this->startAddon = $objAddon; } /** * disable fonts panel in the config */ public function disableFontsPanel(){ $this->isFontsPanelEnabled = false; } }
[-] unitecreator_assets_work.class.php
[edit]
[-] unitecreator_filters_process.class.php
[edit]
[-] unitecreator_api_integrations.class.php
[edit]
[-] unitecreator_params_editor.class.php
[edit]
[-] unitecreator_settings.class.php
[edit]
[-] unitecreator_addon_validator.class.php
[edit]
[-] unitecreator_addon_config.class.php
[edit]
[-] unitecreator_addon_changelog.class.php
[edit]
[-] unitecreator_addon.class.php
[edit]
[-] unitecreator_unitegallery.class.php
[edit]
[-] unitecreator_params_processor.class.php
[edit]
[+]
..
[-] unitecreator_categories.class.php
[edit]
[+]
manager
[-] unitecreator_client_text.php
[edit]
[-] unitecreator_browser.class.php
[edit]
[+]
framework
[+]
layouts
[-] unitecreator_settings_output.class.php
[edit]
[-] unitecreator_exporter.class.php
[edit]
[-] index.html
[edit]
[-] unitecreator_web_api.class.php
[edit]
[-] unitecreator_globals.class.php
[edit]
[-] unitecreator_addons.class.php
[edit]
[-] unitecreator_operations.class.php
[edit]
[-] unitecreator_variables_output.class.php
[edit]
[-] unitecreator_output.class.php
[edit]
[-] unitecreator_exporter_base.class.php
[edit]
[-] unitecreator_template_engine.class.php
[edit]
[-] unitecreator_entrance_animations.class.php
[edit]
[-] unitecreator_assets.class.php
[edit]
[-] unitecreator_library.class.php
[edit]
[-] unitecreator_actions.class.php
[edit]
[-] unitecreator_web_library.class.php
[edit]
[+]
addontypes
[-] unitecreator_dataset.class.php
[edit]
[+]
plugins
[-] unitecreator_form.class.php
[edit]
[-] unitecreator_addon_revisioner.class.php
[edit]
[-] unitecreator_helper.class.php
[edit]
[-] unitecreator_helperhtml.class.php
[edit]
[-] unitecreator_category.class.php
[edit]
[-] unitecreator_dialog_param.class.php
[edit]