本文整理汇总了PHP中EEH_Template::_espresso_themes方法的典型用法代码示例。如果您正苦于以下问题:PHP EEH_Template::_espresso_themes方法的具体用法?PHP EEH_Template::_espresso_themes怎么用?PHP EEH_Template::_espresso_themes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EEH_Template
的用法示例。
在下文中一共展示了EEH_Template::_espresso_themes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_espresso_themes
/**
* 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;
}