theme_menu_link
- Versions
- 7
theme_menu_link(array $variables)
Generate the HTML output for a menu link and submenu.
Parameters
$variables An associative array containing:
- element: Structured array data for a menu link.
Return value
A themed HTML string.
Related topics
Code
includes/menu.inc, line 1394
<?php
function theme_menu_link(array $variables) {
$element = $variables['element'];
$sub_menu = '';
if ($element['#below']) {
$sub_menu = drupal_render($element['#below']);
}
$output = l($element['#title'], $element['#href'], $element['#localized_options']);
return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . "</li>\n";
}
?>Login or register to post comments 