File "provider_output.class.php"

Full path: /home/kosmetik/public_html/wp-content/plugins/unlimited-elements-for-elementor/provider/provider_output.class.php
File size: 1.77 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 UniteCreatorOutput extends UniteCreatorOutputWork
{
    private static $arrStyleHandlesCache = null;
    private static $arrScriptsHandlesCache = null;
    protected function processHtml($html)
    {
        $html = do_shortcode($html);
        return $html;
    }
    protected function putPreviewHtml_headerAdd()
    {
    }
    protected function putPreviewHtml_footerAdd()
    {
    }
    private function getWPDoneStyleHandles()
    {
        if (self::$arrStyleHandlesCache !== null) {
            return self::$arrStyleHandlesCache;
        }
        $wpStyles = wp_styles();
        $arrDoneStyles = $wpStyles->done;
        if (empty($arrDoneStyles)) {
            $arrDoneStyles = array();
        }
        $arrDoneStyles = UniteFunctionsUC::arrayToAssoc($arrDoneStyles);
        self::$arrStyleHandlesCache = $arrDoneStyles;
        return $arrDoneStyles;
    }
    protected function excludeExistingInlcudes($arrIncludes)
    {
        if (empty($arrIncludes)) {
            return $arrIncludes;
        }
        $arrIncludesNew = array();
        foreach ($arrIncludes as $include) {
            $handle = UniteFunctionsUC::getVal($include, "handle");
            $type = UniteFunctionsUC::getVal($include, "type");
            if ($type == "css") {
                $arrStyles = $this->getWPDoneStyleHandles();
                $isExists = isset($arrStyles[$handle]);
                if ($handle == "font-awesome" && $isExists == false) {
                    $isExists = isset($arrStyles["font-awesome-4-shim"]);
                }
                if ($isExists == true) {
                    continue;
                }
            }
            $arrIncludesNew[] = $include;
        }
        return $arrIncludesNew;
    }
}