/** * get_espresso_themes - returns an array of Espresso Child themes located in the /templates/ directory * * @return array */ public static function get_espresso_themes() { if (empty(EEH_Template::$_espresso_themes)) { $espresso_themes = glob(EE_PUBLIC . '*', GLOB_ONLYDIR); if (empty($espresso_themes)) { return array(); } if (($key = array_search('global_assets', $espresso_themes)) !== FALSE) { unset($espresso_themes[$key]); } EEH_Template::$_espresso_themes = array(); foreach ($espresso_themes as $espresso_theme) { EEH_Template::$_espresso_themes[basename($espresso_theme)] = $espresso_theme; } } return EEH_Template::$_espresso_themes; }