Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#15954 closed enhancement (fixed)

Current Item not applied to root relative links

Reported by: WraithKenny Owned by: nacin
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.1
Component: Menus Keywords: has-patch 3.3-early
Focuses: Cc:


The check for the 'current-menu-item' class should test if the $item_url is a site root relative link.

Attachments (2)

root_relative_current.patch (999 bytes) - added by WraithKenny 5 years ago.
Give current-menu-item class even if the link is root relative
root_relative_current.15954.2.diff (1.2 KB) - added by filosofo 5 years ago.

Download all attachments as: .zip

Change History (17)

@WraithKenny5 years ago

Give current-menu-item class even if the link is root relative

comment:1 @WraithKenny5 years ago

  • Owner changed from wraithkenny to WraithKenny
  • Status changed from new to accepted

comment:2 @scribu5 years ago

  • Type changed from defect (bug) to enhancement

comment:3 @ocean905 years ago

  • Owner changed from WraithKenny to filosofo
  • Status changed from accepted to assigned

comment:4 @filosofo5 years ago

root_relative_current.15954.2.diff is basically WraithKenny's patch but makes use of the untrailingslashit work earlier, to avoid duplication.

Last edited 5 years ago by filosofo (previous) (diff)

comment:5 @filosofo5 years ago

  • Keywords 3.2-early added
  • Milestone changed from Awaiting Review to Future Release

comment:6 @WraithKenny4 years ago

still good for 3.2 early?

comment:7 @WraithKenny4 years ago

tested against 3.3-aortic-dissection still good.

comment:8 @WraithKenny4 years ago

  • Keywords 3.3-early added; 3.2-early removed

comment:10 @jamescollins4 years ago

Marked #16724 as a duplicate of this.

root_relative_current.15954.2.diff looks good to me. Is there any chance that this can be included in the scope of 3.3?

comment:11 @nacin4 years ago

  • Milestone changed from Future Release to 3.3
  • Owner changed from filosofo to nacin
  • Status changed from assigned to accepted

comment:12 @nacin4 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In [18746]:

Detect current menu items for root-relative URLs. props filosofo, fixes #15954.

comment:14 @WraithKenny4 years ago

As filosofo said, the patch was basically mine... I wouldn't mention it, but I was hoping to make the credits page. Good enough for props?

comment:15 @nacin4 years ago

Sorry about that, WraithKenny.

Note: See TracTickets for help on using tickets.