validatePHPExtensions(); if(self::$view != GlobalsUC::VIEW_MEDIA_SELECT) self::setMasterView("master_view"); self::requireView(self::$view); } /** * * onAjax action handler */ public static function onAjaxAction(){ GlobalsUC::$isAjaxAction = true; $objActions = new UniteCreatorActions(); $objActions->onAjaxAction(); } /** * add assets for the addon preview */ private static function addAddonPreviewAssets(){ HelperUC::addScript("select2.full.min", "select2_js", "js/select2"); HelperUC::addStyle("select2", "select2_css", "js/select2"); HelperUC::includeUEAnimationStyles(); HelperUC::addStyle("unitecreator_browser", "unitecreator_browser_css"); HelperUC::addScript("unitecreator_helper", "unitecreator_helper"); HelperUC::addScript("unitecreator_addon_preview_admin", "unitecreator_addon_preview_admin"); $fontData = HelperUC::getFontPanelData(); $googleFonts = UniteFunctionsUC::getVal($fontData, "arrGoogleFonts"); $googleFontsBaseUrl = HelperHtmlUC::getGoogleFontBaseUrl(); wp_localize_script("unitecreator_addon_preview_admin", "g_ucGoogleFonts", array( "fonts" => $googleFonts, "base_url" => $googleFontsBaseUrl, )); } }