Permalink
Browse files

Merge pull request #727 from amsross/master

is_dropdown can evaluate to true even if depth is not specified in wp_nav_menu() arguments
  • Loading branch information...
2 parents 5afbd11 + 6b98841 commit 1d7e99fdc81720cf6e3c2af81a016be354563708 @retlehs retlehs committed Apr 5, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 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]) && (($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) {

0 comments on commit 1d7e99f

Please sign in to comment.