Skip to content

Commit

Permalink
Merge pull request roots#587 from wilsonwc/master
Browse files Browse the repository at this point in the history
Fix for compatibility with ubermenu
  • Loading branch information
retlehs committed Nov 2, 2012
2 parents d13f58b + ac6057e commit 998474f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function display_element($element, &$children_elements, $max_depth, $depth = 0,
function roots_nav_menu_css_class($classes, $item) {
$slug = sanitize_title($item->title);
$classes = preg_replace('/(current(-menu-|[-_]page[-_])(item|parent|ancestor))/', 'active', $classes);
$classes = preg_replace('/((menu|page)[-_\w+]+)+/', '', $classes);
$classes = preg_replace('/^((menu|page)[-_\w+]+)+/', '', $classes);

$classes[] = 'menu-' . $slug;

Expand Down

0 comments on commit 998474f

Please sign in to comment.