Opened 9 years ago
Closed 9 years ago
#34468 closed defect (bug) (invalid)
Don't enqueue nav menu scripts or templates in Customizer when panel isn't present
Reported by: | danielbachhuber | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Customize | Keywords: | |
Focuses: | Cc: |
Description
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
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
@danielbachhuber I think the problem is that it is not fully removing the nav menus functionality from being run. Please see #33552 for the code needed in 4.3 and the new code for 4.4: