Pass $depth argument to nav_menu_css_class filter
|Reported by:||cyclometh||Owned by:||cyclometh|
function start_el() in nav-menu-template.php receives a $depth argument, representing the nesting level of the current menu item, but does not pass it to the nav_menu_css_class filter.
Passing the $depth argument allows one to create classes on a menu item such as menu-item-depth-1, menu-item-depth-2, etc by hooking the nav_menu_css_class filter.
Change History (20)
comment:13 @johnbillion — 4 months ago
- Resolution set to fixed
- Status changed from reopened to closed
comment:15 @DrewAPicture — 4 months ago
- Keywords needs-docs added; commit removed
- Resolution fixed deleted
- Status changed from closed to reopened