[wp-trac] [WordPress Trac] #26662: Menus: have main menu assignment persist between theme switches

WordPress Trac noreply at wordpress.org
Tue Dec 17 01:53:05 UTC 2013


#26662: Menus: have main menu assignment persist between theme switches
-------------------------+-----------------------------
 Reporter:  kwight       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Menus        |    Version:  trunk
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 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's `primary` 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

--
Ticket URL: <http://core.trac.wordpress.org/ticket/26662>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list