[wp-trac] [WordPress Trac] #47436: Menu depth doesn't affect menu-item-has-children
WordPress Trac
noreply at wordpress.org
Fri May 31 20:27:33 UTC 2019
#47436: Menu depth doesn't affect menu-item-has-children
--------------------------+------------------------------
Reporter: mikeybinns | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: 5.2.1
Severity: trivial | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+------------------------------
Changes (by mikeybinns):
* keywords: has-patch => needs-patch
Comment:
These patches work for the first depth (the main line) but the class is
also added to lower level submenus.
Example:
{{{
Depth = 1
<li class="no-class">
<a>menu item</a>
</li>
Depth = 2
<li class="menu-item-has-children">
<a>menu item</a>
<ul class="sub-menu">
<li class="menu-item-has-children">
<a>2nd depth menu item with removed submenu</a>
</li>
</ul>
</li>
}}}
I think this needs some kind of depth iterator, so the function knows the
max depth and the current item depth.
Thanks,
Mikey
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47436#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list