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

WordPress Trac noreply at wordpress.org
Fri Mar 31 15:48:37 UTC 2017


#39692: Fix missing assignment of menus on theme switch
-------------------------------------+-----------------------
 Reporter:  melchoyce                |       Owner:
     Type:  enhancement              |      Status:  assigned
 Priority:  normal                   |   Milestone:  4.8
Component:  Menus                    |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+-----------------------
Changes (by obenland):

 * keywords:   => has-patch needs-testing


Comment:

 @melchoyce I added a patch with a first pass.

 It maps menus when old and new themes only have one location or locations
 that are named the same, and also attempts to map locations that share one
 of the common terms you listed earlier.

 I grouped them in primary, secondary, and social menu groups so they only
 map within that group. `'footer-menu'`  would map to `'secondary'` but not
 `'main-menu'` for example.

 The mapping is pretty rudimentary currently, I'm sure that can be
 optimized. Let me know what you think?

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


More information about the wp-trac mailing list