theme_menu_local_action
function theme_menu_local_action
theme_menu_local_action($variables)
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
File
- includes/menu.inc, line 1689
- API for the Drupal menu system.
Code
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; }
© 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_action/7.x