objAddon = new UniteCreatorAddon(); $this->objAddon = null; } /** * set the settings */ public function setSettings(UniteCreatorSettings $settings){ $this->settings = $settings; $this->objAddon = GlobalsProviderUC::$activeAddonForSettings; } /** * add items multisource */ public function addItemsMultisourceSettings($name, $value, $title, $param){ UniteFunctionsUC::validateNotEmpty($this->settings, "settings object"); if(empty($this->objAddon)) return(false); //------ items source ------ $arrSource = array(); $arrSource["items"] = __("Items", "unlimited-elements-for-elementor"); $arrSource["posts_free"] = __("Posts (pro)", "unlimited-elements-for-elementor"); $isWooActive = UniteCreatorWooIntegrate::isWooActive(); if($isWooActive == true) $arrSource["products_free"] = __("WooCommerce Products (pro)", "unlimited-elements-for-elementor"); $metaRepeaterTitle = __("Meta Field (pro)", "unlimited-elements-for-elementor"); $isAcfExists = UniteCreatorAcfIntegrate::isAcfActive(); if($isAcfExists == true) $metaRepeaterTitle = __("ACF Cutom Field (pro)", "unlimited-elements-for-elementor"); $arrSource["repeater_free"] = $metaRepeaterTitle; $arrSource["json_free"] = __("JSON or CSV (pro)", "unlimited-elements-for-elementor"); $arrSource["gallery_free"] = __("Gallery (pro)", "unlimited-elements-for-elementor"); $arrSource["terms_free"] = __("Terms (pro)", "unlimited-elements-for-elementor"); $arrSource["users_free"] = __("Users (pro)", "unlimited-elements-for-elementor"); $arrSource["menu_free"] = __("Menu (pro)", "unlimited-elements-for-elementor"); $hasInstagram = HelperProviderCoreUC_EL::isInstagramSetUp(); if($hasInstagram) $arrSource["instagram_free"] = __("Instagram (pro)", "unlimited-elements-for-elementor"); $arrSource = array_flip($arrSource); $params = array(); $params["origtype"] = UniteCreatorDialogParam::PARAM_DROPDOWN; $this->settings->addSelect($name."_source", $arrSource, __("Items Source", "unlimited-elements-for-elementor"), "items", $params); //--------- message ---------- $params = array(); $params["origtype"] = UniteCreatorDialogParam::PARAM_STATIC_TEXT; $params["elementor_condition"] = array($name."_source!"=>"items"); $text = __("The Multi-Source feature exists only in the PRO version. Upgrade Now

To learn more about Multi-Source Click Here", "unlimited-elements-for-elementor"); $this->settings->addStaticText($text, $name."_source_free_text", $params); } }