diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-09-01 02:13:58 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-09-01 02:13:58 +0000 |
commit | c2a6cc6576461b9e68443d144b8db9c776f5ba7c (patch) | |
tree | 1c2f8262374c4085c040c414e4c4e83748146235 /themes/bartik/template.php | |
parent | 0dc56ece61e0b772f30ed6d53294befc4da3b6a3 (diff) | |
download | brdo-c2a6cc6576461b9e68443d144b8db9c776f5ba7c.tar.gz brdo-c2a6cc6576461b9e68443d144b8db9c776f5ba7c.tar.bz2 |
- Patch #889100 by Jeff Burnz, rfay: remove bartik_page_alter() and extra block classes because they are not used.
Diffstat (limited to 'themes/bartik/template.php')
-rw-r--r-- | themes/bartik/template.php | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/themes/bartik/template.php b/themes/bartik/template.php index f57f9fa75..55d32a37c 100644 --- a/themes/bartik/template.php +++ b/themes/bartik/template.php @@ -108,38 +108,4 @@ function bartik_preprocess_block(&$variables) { 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'; } - // Set "first" and "last" classes. - if ($variables['block']->position_first){ - $variables['classes_array'][] = 'first'; - } - if ($variables['block']->position_last){ - $variables['classes_array'][] = 'last'; - } - // Set "odd" & "even" classes. - $variables['classes_array'][] = $variables['block']->position % 2 == 0 ? 'odd' : 'even'; -} - -/** - * Implements hook_page_alter(). - */ -function bartik_page_alter(&$page) { - // Determine the position and count of blocks within regions. - foreach ($page as &$region) { - // Make sure this is a "region" element. - if (is_array($region) && isset($region['#region'])) { - $i = 0; - foreach ($region as &$block) { - // Make sure this is a "block" element. - if (is_array($block) && isset($block['#block'])) { - $block['#block']->position = $i++; - // Set a flag for "first" and "last" blocks. - $block['#block']->position_first = ($block['#block']->position == 0); - $block['#block']->position_last = FALSE; - $last_block =& $block; - } - } - $last_block['#block']->position_last = TRUE; - $region['#block_count'] = $i; - } - } } |