Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#17076 closed defect (bug) (invalid)

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

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

Description

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)

#1 @andymacb
13 years ago

  • Cc am@… added

#2 @solarissmoke
13 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.

#3 @ocean90
13 years ago

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