You are here

function delta_get_themes_array in Delta 7.2

Same name and namespace in other branches
  1. 6 delta.module \delta_get_themes_array()
  2. 7 delta.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_layouts_list in ./delta_ui.admin.inc
Menu callback; displays the delta listing page.

File

./delta_ui.module, line 107

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 && isset($configurable_themes[$theme->name]) && $configurable_themes[$theme->name]) {
        $themes[$name] = $theme;
      }
    }
    return $themes;
  }
  return FALSE;
}