Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.1244 diff -u -p -r1.1244 common.inc --- includes/common.inc 21 Oct 2010 19:31:39 -0000 1.1244 +++ includes/common.inc 25 Oct 2010 15:30:40 -0000 @@ -6225,7 +6225,7 @@ function drupal_common_theme() { 'render element' => 'element', ), 'menu_local_tasks' => array( - 'variables' => array(), + 'variables' => array('primary' => array(), 'secondary' => array()), ), // from form.inc 'select' => array( Index: includes/menu.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/menu.inc,v retrieving revision 1.416 diff -u -p -r1.416 menu.inc --- includes/menu.inc 21 Oct 2010 11:56:17 -0000 1.416 +++ includes/menu.inc 25 Oct 2010 15:30:40 -0000 @@ -2128,22 +2128,35 @@ function menu_tab_root_path() { } /** - * Returns renderable local tasks. + * Returns a renderable element for the primary and secondary tabs. + */ +function menu_local_tabs() { + return array( + '#theme' => 'menu_local_tasks', + '#primary' => menu_primary_local_tasks(), + '#secondary' => menu_secondary_local_tasks(), + ); +} + +/** + * Returns HTML for primary and secondary local tasks. * * @ingroup themeable */ -function theme_menu_local_tasks() { - $output = array(); +function theme_menu_local_tasks(&$variables) { + $output = ''; - if ($primary = menu_primary_local_tasks()) { - $primary['#prefix'] = '

' . t('Primary tabs') . '

'; - $output[] = $primary; - } - if ($secondary = menu_secondary_local_tasks()) { - $secondary['#prefix'] = '

' . t('Secondary tabs') . '

'; - $output[] = $secondary; + if (!empty($variables['primary'])) { + $variables['primary']['#prefix'] = '

' . t('Primary tabs') . '

'; + $variables['primary']['#prefix'] .= ''; + $output .= drupal_render($variables['primary']); + } + if (!empty($variables['secondary'])) { + $variables['secondary']['#prefix'] = '

' . t('Secondary tabs') . '

'; + $variables['secondary']['#prefix'] .= ''; + $output .= drupal_render($variables['secondary']); } return $output; Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.620 diff -u -p -r1.620 theme.inc --- includes/theme.inc 21 Oct 2010 19:31:39 -0000 1.620 +++ includes/theme.inc 25 Oct 2010 15:31:31 -0000 @@ -2256,7 +2256,7 @@ function template_preprocess_page(&$vari $variables['action_links'] = menu_local_actions(); $variables['site_name'] = (theme_get_setting('toggle_name') ? filter_xss_admin(variable_get('site_name', 'Drupal')) : ''); $variables['site_slogan'] = (theme_get_setting('toggle_slogan') ? filter_xss_admin(variable_get('site_slogan', '')) : ''); - $variables['tabs'] = theme('menu_local_tasks'); + $variables['tabs'] = menu_local_tabs(); if ($node = menu_get_object()) { $variables['node'] = $node; Index: modules/overlay/overlay.module =================================================================== RCS file: /cvs/drupal/drupal/modules/overlay/overlay.module,v retrieving revision 1.31 diff -u -p -r1.31 overlay.module --- modules/overlay/overlay.module 31 Aug 2010 15:04:09 -0000 1.31 +++ modules/overlay/overlay.module 25 Oct 2010 15:30:40 -0000 @@ -350,7 +350,7 @@ function template_process_overlay(&$vari */ function overlay_preprocess_page(&$variables) { if (overlay_get_mode() == 'child') { - unset($variables['tabs'][0]); + unset($variables['tabs']['#primary']); } } Index: themes/garland/page.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/themes/garland/page.tpl.php,v retrieving revision 1.47 diff -u -p -r1.47 page.tpl.php --- themes/garland/page.tpl.php 16 Sep 2010 19:47:45 -0000 1.47 +++ themes/garland/page.tpl.php 25 Oct 2010 15:30:40 -0000 @@ -47,8 +47,8 @@ > -

-

+ + Index: themes/garland/template.php =================================================================== RCS file: /cvs/drupal/drupal/themes/garland/template.php,v retrieving revision 1.42 diff -u -p -r1.42 template.php --- themes/garland/template.php 5 Oct 2010 19:59:10 -0000 1.42 +++ themes/garland/template.php 25 Oct 2010 15:30:40 -0000 @@ -59,7 +59,13 @@ function garland_process_html(&$vars) { * Override or insert variables into the page template. */ function garland_preprocess_page(&$vars) { - $vars['tabs2'] = menu_secondary_local_tasks(); + // Move secondary tabs into a separate variable. + $vars['tabs2'] = array( + '#theme' => 'menu_local_tasks', + '#secondary' => $vars['tabs']['#secondary'], + ); + unset($vars['tabs']['#secondary']); + if (isset($vars['main_menu'])) { $vars['primary_nav'] = theme('links__system_main_menu', array( 'links' => $vars['main_menu'], @@ -139,11 +145,3 @@ function garland_preprocess_region(&$var $vars['classes_array'][] = 'clearfix'; } } - -/** - * Returns the rendered local tasks. The default implementation renders - * them as tabs. Overridden to split the secondary tasks. - */ -function garland_menu_local_tasks() { - return menu_primary_local_tasks(); -} Index: themes/seven/page.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/themes/seven/page.tpl.php,v retrieving revision 1.14 diff -u -p -r1.14 page.tpl.php --- themes/seven/page.tpl.php 5 Oct 2010 00:29:14 -0000 1.14 +++ themes/seven/page.tpl.php 25 Oct 2010 15:30:40 -0000 @@ -8,17 +8,11 @@

- -

- - +
- -

- - +
Index: themes/seven/style.css =================================================================== RCS file: /cvs/drupal/drupal/themes/seven/style.css,v retrieving revision 1.80 diff -u -p -r1.80 style.css --- themes/seven/style.css 15 Oct 2010 04:37:15 -0000 1.80 +++ themes/seven/style.css 25 Oct 2010 15:30:40 -0000 @@ -877,7 +877,6 @@ ol.task-list li.done { background-color: #fff; padding-top: 15px; } -.overlay .primary, .overlay #branding h1.page-title, .overlay #left, .overlay #footer { Index: themes/seven/template.php =================================================================== RCS file: /cvs/drupal/drupal/themes/seven/template.php,v retrieving revision 1.24 diff -u -p -r1.24 template.php --- themes/seven/template.php 5 Oct 2010 19:59:10 -0000 1.24 +++ themes/seven/template.php 25 Oct 2010 15:30:40 -0000 @@ -27,8 +27,12 @@ function seven_preprocess_html(&$vars) { * Override or insert variables into the page template. */ function seven_preprocess_page(&$vars) { - $vars['primary_local_tasks'] = menu_primary_local_tasks(); - $vars['secondary_local_tasks'] = menu_secondary_local_tasks(); + $vars['primary_local_tasks'] = $vars['tabs']; + unset($vars['primary_local_tasks']['#secondary']); + $vars['secondary_local_tasks'] = array( + '#theme' => 'menu_local_tasks', + '#secondary' => $vars['tabs']['#secondary'], + ); } /**