Skip to content
Browse files

Merge pull request #707 from kara-todd/master

Navbar items break if the menu depth is set to exclude children
  • Loading branch information...
2 parents 30c69e4 + 3025797 commit c3e78617059afcfb37d8df92b7bf9941999573c0 @retlehs retlehs committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/nav.php
View
2 lib/nav.php
@@ -38,7 +38,7 @@ function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0) {
}
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) {

0 comments on commit c3e7861

Please sign in to comment.
Something went wrong with that request. Please try again.