Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changed is_dropdown evaluation

is_dropdown can evaluate to true even if max_depth is 0. This is the WordPress default and implies that dropdowns are enabled.
  • Loading branch information...
commit 06c03489bb325c05719ada9ae6751532fe9258d3 1 parent b6e4e92
@amsross amsross authored
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]) && (($depth + 1) < $max_depth)));
+ $element->is_dropdown = ((!empty($children_elements[$element->ID] ) && (($depth + 1 ) < $max_depth || ( $max_depth === 0 ))));
if ($element->is_dropdown) {
if ($depth === 0) {
Please sign in to comment.
Something went wrong with that request. Please try again.