theme_menu_local_task

Versions
4.6 – 5
theme_menu_local_task($mid, $active, $primary)
6
theme_menu_local_task($link, $active = FALSE)
7
theme_menu_local_task($variables)

Generate the HTML output for a single local task link.

Parameters

$variables An associative array containing:

  • #link: A menu link array with 'title', 'href', and 'localized_options' keys.
  • #active: A boolean indicating whether the local task is active.

Related topics

Code

includes/menu.inc, line 1408

<?php
function theme_menu_local_task($variables) {
  $link = $variables['element']['#link'];
  return '<li' . (!empty($variables['element']['#active']) ? ' class="active"' : '') . '>' . l($link['title'], $link['href'], $link['localized_options']) . "</li>\n";
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.