function system_skinr_ui_element_options in Skinr 7.2
Same name and namespace in other branches
- 8.2 modules/system.skinr.inc \system_skinr_ui_element_options()
Implements hook_skinr_ui_element_options().
File
- modules/
system.skinr.inc, line 17 - Implements Skinr hooks for system.module.
Code
function system_skinr_ui_element_options($theme_name = NULL) {
$options = array(
'system' => array(),
);
$options['system']['html'] = t('Page');
foreach (list_themes() as $theme_name => $theme) {
if (empty($theme->status)) {
continue;
}
// Create a list options containing visible regions of this theme.
$regions = array();
foreach (system_region_list($theme_name, REGIONS_VISIBLE) as $region_name => $region) {
$regions['region__' . $region_name] = $region;
}
// Group the list of options by theme.
$key = t('@name Regions', array(
'@name' => $theme->info['name'],
));
$options['system'][$key] = $regions;
}
return $options;
}