Opened 23 months ago
Closed 23 months ago
#56973 closed defect (bug) (duplicate)
New update on class-walker-nav-menu.php missing menu-item-has-children class.
Reported by: | innovext | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 6.1 |
Component: | Menus | Keywords: | |
Focuses: | Cc: |
Description
The new update tries to calculate the depth of menu and check if the depth is with in the args->depth parameter, which is fine, however the actual code to calculate depth was in the wrong place which results in incorrect depth, as a result some menu item will miss menu-item-has-children class.
The code from line 209 to 215 of class-walker-nav-menu.php should be moved outside of the parent foreach loop, otherwise the $menu_items_with_children[ $menu_item->ID ] on 223 will be incorrect.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Hello @innovext, thanks for the report and welcome to WordPress Core Trac,
Moving for 6.1.1 consideration.
Related: #28620 / [54478].