function theme_menu_local_action

Returns HTML for a single local action link.

Parameters

$variables: An associative array containing:

  • element: A render element containing:

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

Related topics

8 theme calls to theme_menu_local_action()
custom_block_menu_local_tasks in drupal/core/modules/block/custom_block/custom_block.module
Implements hook_menu_local_tasks().
design_test_menu_local_tasks_alter in drupal/core/modules/system/tests/modules/design_test/design_test.module
Implements hook_menu_local_tasks_alter().
forum_menu_local_tasks in drupal/core/modules/forum/forum.module
Implements hook_menu_local_tasks().
hook_menu_local_tasks in drupal/core/modules/system/system.api.php
Alter tabs and actions displayed on the page before they are rendered.
menu_get_local_actions in drupal/core/includes/menu.inc
Returns the rendered local actions at the current level.

... See full list

File

drupal/core/includes/menu.inc, line 1690
API for the Drupal menu system.

Code

function theme_menu_local_action($variables) {
  $link = $variables['element']['#link'];
  $link += array(
    'href' => '',
    'localized_options' => array(),
  );
  $link['localized_options']['attributes']['class'][] = 'button';
  $link['localized_options']['attributes']['class'][] = 'button-action';
  $output = '<li>';
  $output .= l($link['title'], $link['href'], $link['localized_options']);
  $output .= "</li>";
  return $output;
}