function ultimenu_system_info_alter in Ultimenu 7
Same name and namespace in other branches
- 8.2 ultimenu.module \ultimenu_system_info_alter()
- 8 ultimenu.module \ultimenu_system_info_alter()
Implements hook_system_info_alter().
File
- ./
ultimenu.module, line 76 - Build Ultimenu regions based on enabled menu and its available menu items.
Code
function ultimenu_system_info_alter(&$info, $file, $type) {
if ($type == 'theme' && isset($info['regions']) && ($regions = ultimenu_regions_enabled())) {
// Append the Ultimenu regions into the theme defined regions.
foreach ($regions as $key => $region) {
$info['regions'] += array(
$key => $region,
);
}
// Force remove unwanted Ultimenu regions from theme .info if so configured.
if (($theme_regions = ultimenu_remove_ultimenu_theme_info()) !== FALSE) {
foreach ($theme_regions as $key => $region) {
unset($info['regions'][$key]);
}
}
}
}