Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 302579705dcaef3950234fb8700100d79583aa0f 1 parent 44dd8f1
Kara Todd kara-todd authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/nav.php
2  lib/nav.php
View
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.