Make WordPress Core

Opened 14 years ago

Closed 8 years ago

#22364 closed enhancement (maybelater)

Add Theme Location Arg to Custom Menu Widget

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

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 14 years ago.
22364.2.patch (575 bytes ) - added by wpsmith 14 years ago.
Added '-sidebar' to ensure no conflicts.
22364.3.patch (584 bytes ) - added by wpsmith 12 years ago.
Changed suffix to '-custommenuwidget'

Download all attachments as: .zip

Change History (8)

@wpsmith
14 years ago

@wpsmith
14 years ago

Added '-sidebar' to ensure no conflicts.

#1 @ocean90
12 years ago

  • Focuses template added
  • Keywords has-patch added
  • Type defect (bug)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
12 years ago

  • Keywords dev-feedback added

@wpsmith
12 years ago

Changed suffix to '-custommenuwidget'

#3 @wpsmith
12 years ago

  • Keywords 2nd-opinion added

Pinging @nacin, @helen and @ericlewis

#5 @welcher
8 years ago

  • Milestone Awaiting Review
  • Resolutionmaybelater
  • Status newclosed

No movement in 3 years. Closing.

Note: See TracTickets for help on using tickets.