is_dropdown can evaluate to true even if depth is not specified in wp_nav_menu() arguments #727

Merged
merged 2 commits into from Apr 5, 2013

Conversation

Projects
None yet
2 participants
Contributor

amsross commented Mar 29, 2013

is_dropdown can evaluate to true even if max_depth is 0. This is the WordPress default and implies that dropdowns are enabled. The current code seems to interperet $max_depth == 0 to mean dropdowns are disabled.

http://codex.wordpress.org/Function_Reference/wp_nav_menu :

$depth (integer) (optional) How many levels of the hierarchy are to be included where 0 means all.
@amsross amsross 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.
06c0348
Owner

retlehs commented Apr 4, 2013

thx, but could you please remove the spaces on the parens to keep the formatting the same as the rest of the codebase?

amsross closed this Apr 5, 2013

amsross reopened this Apr 5, 2013

Contributor

amsross commented Apr 5, 2013

Got it, sorry about that. First pull request, etc. Thanks!

@retlehs retlehs added a commit that referenced this pull request Apr 5, 2013

@retlehs retlehs Merge pull request #727 from amsross/master
is_dropdown can evaluate to true even if depth is not specified in wp_nav_menu() arguments
1d7e99f

@retlehs retlehs merged commit 1d7e99f into roots:master Apr 5, 2013

Owner

retlehs commented Apr 5, 2013

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment