function menu_icon_menu_link in Menu Icons 7.3
Override theme_menu_link - hide link titles if enabled.
Parameters
$variables:
Return value
string
1 string reference to 'menu_icon_menu_link'
- menu_icons_theme_registry_alter in ./
menu_icons.module - Implements hook_theme_registry_alter() Override the nodehierarchy child links function.
File
- ./
menu_icons.module, line 602 - Module to associate icons with menu items
Code
function menu_icon_menu_link($variables) {
$element = $variables['element'];
$sub_menu = '';
if ($element['#below']) {
$sub_menu = drupal_render($element['#below']);
}
$output = l($element['#title'], $element['#href'], $element['#localized_options']);
if (isset($element['#localized_options']['menu_icon'])) {
if ($element['#localized_options']['menu_icon']['enable'] == 1) {
$element['#attributes']['title'] = $element['#title'];
$output = l('', $element['#href'], $element['#localized_options']);
}
}
return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . "</li>\n";
}