Fix for theme menu

  1. /**
  2.  * Implements theme_menu_item_link()
  3.  */
  4. function garland_menu_item_link($link) {
  5.   if (empty($link['localized_options'])) {
  6.     $link['localized_options'] = array();
  7.   }
  8.  
  9.   // If an item is a LOCAL TASK, render it as a tab
  10.   if ($link['type'] & MENU_IS_LOCAL_TASK) {
  11.     $link['title'] = '<span class="tab">' . check_plain($link['title']) . '</span>';
  12.     $link['localized_options']['html'] = TRUE;
  13.   }
  14.         $link['localized_options']['attributes'] = array(
  15.                 'class' => 'mlid-' . $link['mlid'],
  16.         );
  17.   return l($link['title'], $link['href'], $link['localized_options']);
  18. }

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.