WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 14 months ago

#22364 closed enhancement (maybelater)

Add Theme Location Arg to Custom Menu Widget

Reported by: wpsmith Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Menus Keywords: has-patch dev-feedback 2nd-opinion
Focuses: template Cc:

Description

Currently, there is no way to differentiate between a custom menu placed in two different widget areas with wp_nav_menu_args. Since there is no real effect on themes or the use of wp_nav_menu, I propose that WP_Nav_Menu_Widget applies the widget ID as the theme location.

Attachments (3)

22364.patch (562 bytes) - added by wpsmith 7 years ago.
22364.2.patch (575 bytes) - added by wpsmith 7 years ago.
Added '-sidebar' to ensure no conflicts.
22364.3.patch (584 bytes) - added by wpsmith 5 years ago.
Changed suffix to '-custommenuwidget'

Download all attachments as: .zip

Change History (8)

@wpsmith
7 years ago

@wpsmith
7 years ago

Added '-sidebar' to ensure no conflicts.

#1 @ocean90
5 years ago

  • Focuses template added
  • Keywords has-patch added
  • Type changed from defect (bug) to enhancement

Patch looks interesting. By default theme_location should be a value which is registered via register_nav_menu().

In this case it would work because wp_nav_menu() uses theme_location only if $menu isn't set.

As an alternative we could add a context arg to wp_nav_menu().

#2 @wpsmith
5 years ago

  • Keywords dev-feedback added

@wpsmith
5 years ago

Changed suffix to '-custommenuwidget'

#3 @wpsmith
5 years ago

  • Keywords 2nd-opinion added

Pinging @nacin, @helen and @ericlewis

#5 @welcher
14 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed

No movement in 3 years. Closing.

Note: See TracTickets for help on using tickets.