Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#17076 closed defect (bug) (invalid)

Nav menus produce duplicate classes on li elements for Page parents/ancestors

Reported by: andymacb Owned by:
Milestone: Priority: normal
Severity: trivial Version: 3.1
Component: General Keywords:
Focuses: Cc:


Using a fresh WP3.1.1, 2010 theme, Theme Unit Test data, adding a navigation menu with Parent Page, Child Page 1 & Child Page 2 arranged as a parent menu item with 2 children.

The <li> for the parent menu item gets classes: menu-item menu-item-type-post_type menu-item-object-page current-page-ancestor current-menu-ancestor current-menu-parent current-page-parent current_page_parent current_page_ancestor menu-item-689

current_page_parent & current_page_ancestor are included twice.

AFAIK this doesn't upset any current browser, so I've tagged this trivial.

Change History (3)

comment:1 @andymacb5 years ago

  • Cc am@… added

comment:2 @solarissmoke5 years ago

  • Resolution set to invalid
  • Status changed from new to closed

There aren't any duplicates in that list.

It does have current-page-ancestor as well as current_page_ancestor, and current-page-parent as well as current_page_ancestor (note underscore vs hyphens), but these are not duplicates. The underscored classes are there for backward compatibility with previous versions of wordpress.

comment:3 @ocean905 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.