WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 2 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:

Description

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 3 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 3 years ago.

Download all attachments as: .zip

Change History (17)

WraithKenny3 years ago

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

comment:1 WraithKenny3 years ago

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

comment:2 scribu3 years ago

  • Type changed from defect (bug) to enhancement

comment:3 ocean903 years ago

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

comment:4 filosofo3 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 3 years ago by filosofo (previous) (diff)

comment:5 filosofo3 years ago

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

comment:6 WraithKenny3 years ago

still good for 3.2 early?

comment:7 WraithKenny3 years ago

tested against 3.3-aortic-dissection still good.

comment:8 WraithKenny3 years ago

  • Keywords 3.3-early added; 3.2-early removed

comment:10 jamescollins3 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 nacin3 years ago

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

comment:12 nacin3 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 WraithKenny3 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 nacin2 years ago

Sorry about that, WraithKenny.

Note: See TracTickets for help on using tickets.