Opened 12 years ago
Closed 7 years 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)
Change History (8)
#1
@
11 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()
.
Note: See
TracTickets for help on using
tickets.
Added '-sidebar' to ensure no conflicts.