#26662 closed enhancement (duplicate)
Menus: have main menu assignment persist between theme switches
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.8 |
Component: | Menus | Keywords: | |
Focuses: | Cc: |
Description
When a user switches to a new (never before used) theme, can we somehow assign their previous main menu to the new theme's main location? If we were to standardize on a register_nav_menu
location key (say, primary
), shouldn't we be able to:
- Check if the new theme has a location called
primary
- If a menu is already assigned, use that one (the case when a user switches back to a previously used theme)
- If not, take the last theme's menu assigned to
primary
and assign it to the new theme'sprimary
location - If there's no
primary
location but only one location in the new theme, assign the original location to the only new theme location - If there's no
primary
location but many menus, assign it to the first in the array of registered menus
Change History (5)
Note: See
TracTickets for help on using
tickets.
Related: #17979 (for widgets).