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

WordPress Trac noreply at wordpress.org
Tue Jun 27 10:32:02 UTC 2017


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

Comment (by obenland):

 Replying to [comment:35 joyously]:
 > apparently this is not handling Customizer previewing at all.

 It's not handling it yet,
 [https://wordpress.slack.com/archives/C0381N237/p1498496867528923 like I
 said].

 > Case 1: the new theme has theme_mods already. Those should be used,
 untouched.

 They are used, though not untouched. If a menu was changed since the theme
 was active last, we should account for that.

 > the new function is called `_wp_menus_changed()`, but it is about
 changing themes, not menus. Perhaps a little more clarity in the name, so
 it can be called from both `switch_theme()` and whatever the Customizer
 equivalent is?

 That name is modeled after `_wp_sidebars_changed()`, but I'm open to
 suggestions. The meat of the function will probably have to be separated
 out anyway to accommodate the customizer.

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


More information about the wp-trac mailing list