diff options
-rw-r--r-- | modules/system/system.module | 10 | ||||
-rw-r--r-- | themes/bartik/template.php | 10 |
2 files changed, 11 insertions, 9 deletions
diff --git a/modules/system/system.module b/modules/system/system.module index 92feed6be..9be91061b 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -1982,6 +1982,16 @@ function system_block_view($delta = '') { } /** + * Implements hook_preprocess_block(). + */ +function system_preprocess_block(&$variables) { + // System menu blocks should get the same class as menu module blocks. + if ($variables['block']->module == 'system' && in_array($variables['block']->delta, array_keys(menu_list_system_menus()))) { + $variables['classes_array'][] = 'block-menu'; + } +} + +/** * Provide a single block on the administration overview page. * * @param $item diff --git a/themes/bartik/template.php b/themes/bartik/template.php index 128c6458d..f57f9fa75 100644 --- a/themes/bartik/template.php +++ b/themes/bartik/template.php @@ -105,17 +105,9 @@ function bartik_process_maintenance_page(&$variables) { function bartik_preprocess_block(&$variables) { // In the header region, visually hide the title of any menu block or of the // user login block, but leave it accessible. - if ($variables['block']->region == 'header' && ($variables['block']->module == 'menu' || $variables['block']->module == 'user' && $variables['block']->delta == 'login')) { + if ($variables['block']->region == 'header' && ($variables['block']->module == 'user' && $variables['block']->delta == 'login' || in_array('block-menu', $variables['classes_array']))) { $variables['title_attributes_array']['class'][] = 'element-invisible'; } - // System menu blocks should get the same class as menu module blocks. - if (in_array($variables['block']->delta, array_keys(menu_list_system_menus()))) { - $variables['classes_array'][] = 'block-menu'; - // Also, hide the title if its in the header region. - if ($variables['block']->region == 'header') { - $variables['title_attributes_array']['class'][] = 'element-invisible'; - } - } // Set "first" and "last" classes. if ($variables['block']->position_first){ $variables['classes_array'][] = 'first'; |