function regions_init in Regions 6
Same name and namespace in other branches
- 7 regions.module \regions_init()
Implementation of hook_init().
File
- ./
regions.module, line 32 - Add regions to the screen that are cross-theme compliant
Code
function regions_init() {
// Check for current theme.
init_theme();
global $theme_key;
$regions = _regions_list($theme_key);
foreach ($regions as $region_info) {
// Add optional js files if defined.
if (isset($region_info['js'])) {
drupal_add_js($region_info['js']);
}
// Add optional stylesheets if defined.
if (isset($region_info['css'])) {
drupal_add_css($region_info['css']);
}
}
}