[wp-trac] [WordPress Trac] #34468: Don't enqueue nav menu scripts or templates in Customizer when panel isn't present

WordPress Trac noreply at wordpress.org
Tue Oct 27 16:00:39 UTC 2015


#34468: Don't enqueue nav menu scripts or templates in Customizer when panel isn't
present
-----------------------------+-----------------------------
 Reporter:  danielbachhuber  |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Customize        |    Version:
 Severity:  normal           |   Keywords:  has-patch
  Focuses:                   |
-----------------------------+-----------------------------
 I've removed the panel:

 {{{
 private function setup_actions() {
                 add_action( 'customize_register', array( $this,
 'action_customizer_register_remove_default_controls' ), 11 );
         }

         public function
 action_customizer_register_remove_default_controls( $customizer ) {
                 $customizer->remove_panel( 'nav_menus' );
         }
 }}}

 In doing so, I get error notices in my logs:

 {{{
 [27-Oct-2015 11:48:36 America/New_York] PHP Notice:  Trying to get
 property of non-object in /srv/www/site.dev/wp-includes/class-wp-
 customize-nav-menus.php on line 340
 [27-Oct-2015 11:48:36 America/New_York] PHP Notice:  Trying to get
 property of non-object in /srv/www/site.dev/wp-includes/class-wp-
 customize-nav-menus.php on line 709
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34468>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list