function theme_menu_local_tasks

Returns HTML for primary and secondary local tasks.

Parameters

$variables: An associative array containing:

  • primary: (optional) An array of local tasks (tabs).
  • secondary: (optional) An array of local tasks (tabs).

See also

menu_local_tasks()

Related topics

3 theme calls to theme_menu_local_tasks()
garland_preprocess_page in themes/garland/template.php
Override or insert variables into the page template.
menu_local_tabs in includes/menu.inc
Returns a renderable element for the primary and secondary tabs.
seven_preprocess_page in themes/seven/template.php
Override or insert variables into the page template.

File

includes/menu.inc, line 2304

Code

function theme_menu_local_tasks(&$variables) {
    $output = '';
    if (!empty($variables['primary'])) {
        $variables['primary']['#prefix'] = '<h2 class="element-invisible">' . t('Primary tabs') . '</h2>';
        $variables['primary']['#prefix'] .= '<ul class="tabs primary">';
        $variables['primary']['#suffix'] = '</ul>';
        $output .= drupal_render($variables['primary']);
    }
    if (!empty($variables['secondary'])) {
        $variables['secondary']['#prefix'] = '<h2 class="element-invisible">' . t('Secondary tabs') . '</h2>';
        $variables['secondary']['#prefix'] .= '<ul class="tabs secondary">';
        $variables['secondary']['#suffix'] = '</ul>';
        $output .= drupal_render($variables['secondary']);
    }
    return $output;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.