function bootstrap_preprocess_menu_link

7.x-3.x menu-link.vars.php bootstrap_preprocess_menu_link(array &$variables)

Pre-processes variables for the "menu_link" theme hook.

See theme function for list of available variables.


array $variables: An associative array of variables, passed by reference.

Related topics

Source templates/menu/menu-link.vars.php (line 21)

function bootstrap_preprocess_menu_link(array &$variables) {
  $element = &$variables['element'];

  // Determine if the link should be shown as "active" based on the current
  // active trail (set by core/contrib modules).
  // @see
  // @see
  if (in_array('active-trail', _bootstrap_get_classes($element)) || ($element['#href'] == '<front>' && drupal_is_front_page())) {
    $element['#attributes']['class'][] = 'active';