Make WordPress Core

Opened 13 months ago

Last modified 8 weeks ago

#23908 new defect (bug)

wp_nav_menu generates wrong classes for li elements

Reported by: anyname2 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.5.1
Component: Menus Keywords: needs-patch dev-feedback
Focuses: Cc:


Function wp_nav_menu generates 2 different classes for <li> with exactly the same meaning: e.g. current-page-parent and current_page_parent. It sometimes generates one of them, but sometimes both.

Also this coresponds to current-page-ancestor and current_page_ancestor classes.

I think there should be one of them, but to preserve compatibility with older websites, it is better to leave both but generate both at the same time, so that user could use either "-" or "_" as separators.

Change History (2)

comment:1 Latz8 weeks ago

Hello anyname2,

thank you for your report. Sorry you never got a response.

I can't find any appearances of current-page-parent or current-page-ancestor in the code. Could you narrow down where you think the problem is occurring?

comment:2 ircbot8 weeks ago

This ticket was mentioned in IRC in #wordpress-dev by helen. View the logs.

Note: See TracTickets for help on using tickets.