Make WordPress Core

Timestamp:
10/11/2022 02:02:55 PM (3 years ago)
Author:
audrasjb
Message:

Menus: Remove .menu-item-has-children on wp_nav_menu last level menu items when $depth arg is used.

This changeset prevents wp_nav_menu last level menu items from having the .menu-item-has-children class when the $depth argument is used. It adds a loop in wp_nav_menu() to calculate the depth of each menu item with children to make sure the class is added only when applicable.

Props slobodanmanic, kucrut, iCaspar, mdgl, petitphp, audrasjb, costdev.
Fixes #28620.

File:
1 added

Note: See TracChangeset for help on using the changeset viewer.