function theme_menu_local_action

7.x theme_menu_local_action($variables)
8.x theme_menu_local_action($variables)

Returns HTML for a single local action link.


$variables: An associative array containing:

  • element: A render element containing:

    • #link: A menu link array with 'title', 'href', and 'localized_options' keys.

Related topics

5 string references to the theme hook from theme_menu_local_action()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

blog_menu_local_tasks_alter in drupal/modules/blog/blog.module
Implements hook_menu_local_tasks_alter().
drupal_common_theme in drupal/includes/
Provides theme registration for themes across .inc files.
forum_menu_local_tasks_alter in drupal/modules/forum/forum.module
Implements hook_menu_local_tasks_alter().
menu_local_tasks in drupal/includes/
Collects the local tasks (tabs), action links, and the root path.
node_menu_local_tasks_alter in drupal/modules/node/node.module
Implements hook_menu_local_tasks_alter().


drupal/includes/, line 1689
API for the Drupal menu system.


function theme_menu_local_action($variables) {
  $link = $variables['element']['#link'];

  $output = '<li>';
  if (isset($link['href'])) {
    $output .= l($link['title'], $link['href'], isset($link['localized_options']) ? $link['localized_options'] : array());
  elseif (!empty($link['localized_options']['html'])) {
    $output .= $link['title'];
  else {
    $output .= check_plain($link['title']);
  $output .= "</li>\n";

  return $output;