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)
Change History (8)
#1
@
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().
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Added '-sidebar' to ensure no conflicts.