From 302579705dcaef3950234fb8700100d79583aa0f Mon Sep 17 00:00:00 2001 From: kara-todd Date: Fri, 8 Mar 2013 14:01:14 -0500 Subject: [PATCH] Fix for navbar dropdowns Navbar items with children broke if the menu depth excluded the children. Such as: wp_nav_menu(array('depth' => 1)) where 2nd level children exist --- lib/nav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nav.php b/lib/nav.php index 7e5b548..b4b516e 100644 --- a/lib/nav.php +++ b/lib/nav.php @@ -38,7 +38,7 @@ class Roots_Nav_Walker extends Walker_Nav_Menu { } function display_element($element, &$children_elements, $max_depth, $depth = 0, $args, &$output) { - $element->is_dropdown = !empty($children_elements[$element->ID]); + $element->is_dropdown = ((!empty($children_elements[$element->ID]) && (($depth + 1) < $max_depth))); if ($element->is_dropdown) { if ($depth === 0) {