Opened 4 years ago
Closed 4 years 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: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Menus | Version: | 6.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hello @innovext, thanks for the report and welcome to WordPress Core Trac,
Moving for 6.1.1 consideration.
Related: #28620 / [54478].