File "provider_manager_addons.class.php"

Full path: /home/kosmetik/public_html/wp-content/plugins/unlimited-elements-for-elementor/provider/provider_manager_addons.class.php
File size: 1.66 B
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Editor   Back

<?php

defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
class UniteCreatorManagerAddons extends UniteCreatorManagerAddonsWork
{
    private function modifyCatAddons_checkImportedElementorTemplates($addons)
    {
        if (empty($addons)) {
            return $addons;
        }
        $arrImportedTemplates = HelperProviderCoreUC_EL::getImportedElementorTemplates();
        if (empty($arrImportedTemplates)) {
            return $addons;
        }
        foreach ($addons as $key => $addon) {
            if (is_array($addon) == false) {
                continue;
            }
            $name = UniteFunctionsUC::getVal($addon, "name");
            $importedTemplateID = UniteFunctionsUC::getVal($arrImportedTemplates, $name);
            if (empty($importedTemplateID)) {
                continue;
            }
            $addon["imported_templateid"] = $importedTemplateID;
            $addons[$key] = $addon;
        }
        return $addons;
    }
    protected function modifyCatAddons($addons, $addonType)
    {
        if (empty($addons)) {
            return $addons;
        }
        if ($addonType == "elementor_template") {
            $addons = $this->modifyCatAddons_checkImportedElementorTemplates($addons);
        }
        return $addons;
    }
    protected function getShortcodeTemplate()
    {
        $shortcode = GlobalsProviderUC::SHORTCODE_LAYOUT;
        $shortcodeTemplate = "[{$shortcode} id=%id% title=\"%title%\"]";
        return $shortcodeTemplate;
    }
    public function __construct()
    {
        parent::__construct();
        $urlLicense = HelperUC::getViewUrl(GlobalsUC::VIEW_LICENSE);
        $this->urlBuy = $urlLicense;
    }
}