[wp-trac] [WordPress Trac] #33411: remove_panel('nav_menus') action generates errors

WordPress Trac noreply at wordpress.org
Wed Aug 19 03:38:36 UTC 2015


#33411: remove_panel('nav_menus') action generates errors
--------------------------+------------------------------
 Reporter:  IstanbulMMV   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Customize     |     Version:  4.3
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  administration
--------------------------+------------------------------

Comment (by IstanbulMMV):

 Replying to [comment:1 celloexpressions]:
 > Removing the panel probably isn't the best approach here since menus are
 more fully integrated with core (hence the notice). Temporary workarounds
 would be trying to change the capability set on the panel or adding an
 active callback filter that disables it, ie (untested):
 > {{{
 > $wp_customize->get_panel( 'nav_menus' )->active_callback =
 '__return_false';
 > }}}
 >
 > We should investigate whether there's a way to avoid that error though.

 Many thanks Nick. Adding your suggested callback removed the menus panel
 and appears to have had no adverse affect on any custom panels. Much
 appreciated.

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


More information about the wp-trac mailing list