function ultimenu_get_ultimenu_theme_info in Ultimenu 7
Gets Ultimenu regions from the default theme .info.
2 calls to ultimenu_get_ultimenu_theme_info()
- ultimenu_admin_settings in includes/
ultimenu.admin.inc - Menu callback for 'admin/structure/ultimenu'.
- ultimenu_remove_ultimenu_theme_info in includes/
ultimenu.utilities.inc - Colllects unwanted Ultimenu regions for removal stored in the theme .info.
File
- includes/
ultimenu.utilities.inc, line 155 - Misc functions that hardly change.
Code
function ultimenu_get_ultimenu_theme_info() {
$regions =& drupal_static(__FUNCTION__);
if (!isset($regions)) {
$theme = variable_get('theme_default', 'bartik');
$file = drupal_get_path('theme', $theme) . '/' . $theme . '.info';
// Parse theme .info file.
$info = drupal_parse_info_file($file);
$regions = array();
foreach ($info['regions'] as $key => $region) {
if (array_key_exists($key, ultimenu_regions())) {
$regions[$key] = $region;
}
}
}
return $regions;
}