function theme_menu_local_tasks
theme_menu_local_tasks(&$variables)
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
Related topics
File
- includes/menu.inc, line 2290
- API for the Drupal menu system.
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; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!menu.inc/function/theme_menu_local_tasks/7.x