[wp-trac] [WordPress Trac] #39692: Fix missing assignment of menus on theme switch

WordPress Trac noreply at wordpress.org
Tue Feb 28 16:04:11 UTC 2017


#39692: Fix missing assignment of menus on theme switch
-------------------------+----------------------------
 Reporter:  melchoyce    |       Owner:  jonathanbardo
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  4.8
Component:  Menus        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+----------------------------

Comment (by melchoyce):

 Replying to [comment:13 jonathanbardo]:
 > @melchoyce I'm a bit confused too since when testing changing themes,
 menus were assign automatically to a menu location if they shared the same
 id. Maybe I'm not testing correctly?

 Yup! The issue is when menus ''don't'' share the same IDs. We're trying to
 intelligently re-assign menus that don't match, using these criteria:

 1. If your old theme only has one menu and your new theme only has one
 menu, just map them automatically
 2. If your old theme and new theme share a similar (not the same) IDs or
 name, map them automatically (so, primary, main, sidebar 1, etc. are all
 similar in concept)
 3. If your old theme has more than one menu, or your new theme has more
 than one menu, map the menu in the first menu location in your old theme
 to the first menu location in the new theme.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39692#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list