menu.inc

  1. cis7 includes/menu.inc
  2. cis7 sites/all/themes/local_contrib/zurb-foundation/inc/menu.inc
  3. cis7 sites/all/modules/ulmus/ctools/includes/menu.inc
  4. cle7 sites/all/themes/local_contrib/zurb_foundation/inc/menu.inc
  5. cle7 sites/all/themes/local_contrib/zurb_foundation/inc/menu.inc
  6. cle7 includes/menu.inc
  7. cle7 sites/all/themes/local_contrib/bootstrap/includes/menu.inc
  8. cle7 sites/all/modules/ulmus/ctools/includes/menu.inc
  9. ecd7 sites/all/themes/local_contrib/zurb_foundation/inc/menu.inc
  10. ecd7 sites/all/modules/ulmus/ctools/includes/menu.inc
  11. ecd7 includes/menu.inc
  12. elmsmedia7 sites/all/themes/local_contrib/zurb_foundation/inc/menu.inc
  13. elmsmedia7 sites/all/modules/ulmus/ctools/includes/menu.inc
  14. elmsmedia7 includes/menu.inc
  15. harmony7 sites/all/modules/ulmus/ctools/includes/menu.inc
  16. harmony7 sites/all/themes/local_contrib/zurb_foundation/inc/menu.inc
  17. harmony7 includes/menu.inc
  18. icor7 sites/all/themes/local_contrib/zurb_foundation/inc/menu.inc
  19. icor7 sites/all/modules/ulmus/ctools/includes/menu.inc
  20. icor7 includes/menu.inc
  21. meedjum_blog7 includes/menu.inc
  22. meedjum_blog7 sites/all/modules/ulmus/ctools/includes/menu.inc
  23. meedjum_blog7 sites/all/themes/local_contrib/zurb_foundation/inc/menu.inc
  24. mooc7 sites/all/themes/local_contrib/zurb_foundation/inc/menu.inc
  25. mooc7 includes/menu.inc
  26. mooc7 sites/all/modules/ulmus/ctools/includes/menu.inc

Functions

File

sites/all/themes/local_contrib/zurb-foundation/inc/menu.inc
View source
  1. <?php
  2. /**
  3. * Implements theme_menu_local_tasks().
  4. */
  5. function zurb_foundation_menu_local_tasks(&$variables) {
  6. $output = '';
  7. if (!empty($variables['primary'])) {
  8. $variables['primary']['#prefix'] = '<h2 class="element-invisible">' . t('Primary tabs') . '</h2>';
  9. $variables['primary']['#prefix'] .= '<ul class="button-group">';
  10. $variables['primary']['#suffix'] = '</ul>';
  11. $output .= drupal_render($variables['primary']);
  12. }
  13. if (!empty($variables['secondary'])) {
  14. $variables['secondary']['#prefix'] = '<h2 class="element-invisible">' . t('Secondary tabs') . '</h2>';
  15. $variables['secondary']['#prefix'] .= '<ul class="button-group">';
  16. $variables['secondary']['#suffix'] = '</ul>';
  17. $output .= drupal_render($variables['secondary']);
  18. }
  19. return $output;
  20. }
  21. /**
  22. * Implements theme_menu_local_task().
  23. */
  24. function zurb_foundation_menu_local_task(&$variables) {
  25. $link = $variables['element']['#link'];
  26. $link_text = $link['title'];
  27. $li_class = (!empty($variables['element']['#active']) ? ' class="active"' : '');
  28. if (!empty($variables['element']['#active'])) {
  29. // Add text to indicate active tab for non-visual users.
  30. $active = '<span class="element-invisible">' . t('(active tab)') . '</span>';
  31. // If the link does not contain HTML already, check_plain() it now.
  32. // After we set 'html'=TRUE the link will not be sanitized by l().
  33. if (empty($link['localized_options']['html'])) {
  34. $link['title'] = check_plain($link['title']);
  35. }
  36. $link['localized_options']['html'] = TRUE;
  37. $link_text = t('!local-task-title!active', array('!local-task-title' => $link['title'], '!active' => $active));
  38. }
  39. // Add section tab styling
  40. $link['localized_options']['attributes']['class'] = array('small', 'button', 'secondary');
  41. $output = '';
  42. $output .= '<li' . $li_class . '>';
  43. $output .= l($link_text, $link['href'], $link['localized_options']);
  44. $output .= "</li>\n";
  45. return $output;
  46. }