function theme_menu_local_task


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 theme_menu_local_task($variables)
cle7 theme_menu_local_task($variables)
elmsmedia7 theme_menu_local_task($variables)
icor7 theme_menu_local_task($variables)
meedjum_blog7 theme_menu_local_task($variables)
mooc7 theme_menu_local_task($variables)

Returns HTML for a single local task link.


$variables: An associative array containing:

  • element: A render element 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

5 string references to the theme hook from theme_menu_local_task()

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.

drupal_common_theme in includes/
Provides theme registration for themes across .inc files.
hook_menu_local_tasks_alter in modules/system/system.api.php
Alter tabs and actions displayed on the page before they are rendered.
menu_local_tasks in includes/
Collects the local tasks (tabs), action links, and the root path.
views_ui_edit_page_display_tabs in sites/all/modules/ulmus/views/includes/
Adds tabs for navigating across Displays when editing a View.
_ctools_menu_add_dynamic_items in sites/all/modules/ulmus/ctools/includes/


includes/, line 1648
API for the Drupal menu system.


function theme_menu_local_task($variables) {
  $link = $variables['element']['#link'];
  $link_text = $link['title'];

  if (!empty($variables['element']['#active'])) {
    // Add text to indicate active tab for non-visual users.
    $active = '<span class="element-invisible">' . t('(active tab)') . '</span>';

    // If the link does not contain HTML already, check_plain() it now.
    // After we set 'html'=TRUE the link will not be sanitized by l().
    if (empty($link['localized_options']['html'])) {
      $link['title'] = check_plain($link['title']);
    $link['localized_options']['html'] = TRUE;
    $link_text = t('!local-task-title!active', array('!local-task-title' => $link['title'], '!active' => $active));

  return '<li' . (!empty($variables['element']['#active']) ? ' class="active"' : '') . '>' . l($link_text, $link['href'], $link['localized_options']) . "</li>\n";



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.