function icon_enabled_themes in Icon API 7
Same name and namespace in other branches
- 8 includes/utilities.inc \icon_enabled_themes()
Determine which themes are enabled.
Return value
array An array of theme names.
1 call to icon_enabled_themes()
- icon_extension_implements in includes/
utilities.inc - Determines which extensions are implementing a hook.
File
- includes/
utilities.inc, line 266 - utilities.inc Provides useful functions and common tasks.
Code
function icon_enabled_themes() {
$themes =& drupal_static(__FUNCTION__);
if (!isset($themes)) {
$themes = array();
foreach (list_themes() as $theme) {
if (!$theme->status || in_array($theme->name, $themes)) {
continue;
}
$themes[] = $theme->name;
// Merge in the base themes if this is a sub-theme.
if (isset($theme->base_themes)) {
// Only add the theme if it's not already in the list.
foreach (array_keys($theme->base_themes) as $name) {
if (!in_array($name, $themes)) {
$themes[] = $name;
}
}
}
}
}
return $themes;
}