function delta_get_themes_form_array in Delta 7
Same name and namespace in other branches
- 6 delta.module \delta_get_themes_form_array()
- 7.2 delta_ui.module \delta_get_themes_form_array()
Pull data from actively selected themes
Return value
a usable array of theme data for use in forms for checkboxes or radio buttons
2 calls to delta_get_themes_form_array()
- delta_manage_override_form in ./
delta.module - delta_theme_settings_config in ./
delta-settings.inc - Default module settings form for Delta Theme API
File
- ./
delta.module, line 440 - 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_form_array(&$filter) {
$system_themes = list_themes();
$configurable_themes = variable_get('delta_themes', array());
$themes = array();
if (is_array($system_themes)) {
foreach ($system_themes as $name => $theme) {
// let's gather active themes only
if (!$filter) {
if ($theme->status == 1) {
$themes[$name] = $theme->info['name'];
}
}
else {
if ($theme->status == 1 && $configurable_themes[$theme->name]) {
$themes[$name] = $theme->info['name'];
}
}
}
return $themes;
}
return FALSE;
}