Make WordPress Core

Opened 13 years ago

Closed 11 years ago

Last modified 11 years ago

#23908 closed defect (bug) (invalid)

wp_nav_menu generates wrong classes for li elements

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

Description

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 (6)

#1 @Latz
13 years 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?

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


13 years ago

#3 @wonderboymusic
12 years ago

  • Keywords reporter-feedback added; dev-feedback removed

#4 @Latz
12 years ago

The class current_page_ancestor is added intentionally for backward compatibility with the current_page_ classes defaults (#12812). I think this is a wontfix.

#5 @chriscct7
11 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review
  • Resolutionworksforme
  • Status newclosed

Per #12812, this is intended behavior.

#6 @chriscct7
11 years ago

  • Resolution worksformeinvalid
Note: See TracTickets for help on using tickets.