function delta_get_themes_array in Delta 7
Same name and namespace in other branches
- 6 delta.module \delta_get_themes_array()
 - 7.2 delta_ui.module \delta_get_themes_array()
 
Pull data from actively selected themes
Return value
the full theme array as normally pulled by list_themes(), but filters out the inactive themes.
1 call to delta_get_themes_array()
- delta_menu in ./
delta.module  - Implementation of hook_menu().
 
File
- ./
delta.module, line 420  - The Delta Theme API is an advanced manipulation of the Theme Settings API to allow for customization/configuration of theme settings based on node types, context, or groups of paths.
 
Code
function delta_get_themes_array() {
  $system_themes = list_themes();
  $themes = array();
  $configurable_themes = variable_get('delta_themes', array());
  if (is_array($system_themes)) {
    foreach ($system_themes as $name => $theme) {
      // let's gather active themes only, and the ones that have been set in Delta API global settings
      if ($theme->status == 1 && $configurable_themes[$theme->name]) {
        $themes[$name] = $theme;
      }
    }
    return $themes;
  }
  return FALSE;
}