Create New Item
×
Item Type
File
Folder
Item Name
×
Search file in folder and subfolders...
File Manager
/
wp-content
/
plugins
/
unlimited-elements-for-elementor
/
provider
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?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; } }