Skip to content

Instantly share code, notes, and snippets.

@benschaaf
Created November 21, 2013 20:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benschaaf/7588886 to your computer and use it in GitHub Desktop.
Save benschaaf/7588886 to your computer and use it in GitHub Desktop.
Wrap the link title in a span, that will get display none. I could have also just removed the title, but I wanted it there for SEO (I guess)
<?php
function ross_menu_link__menu_block__menu_social(array $variables) {
$element = $variables['element'];
$sub_menu = '';
if ($element['#below']) {
$sub_menu = drupal_render($element['#below']);
}
$element['#localized_options']['html'] = TRUE;
$element['#title'] = '<span>' . $element['#title'] . '</span>';
$output = l($element['#title'], $element['#href'], $element['#localized_options']);
return '<li ' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . "</li>\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment