Make WordPress Core

Opened 7 years ago

Last modified 3 years ago

#38967 new defect (bug)

Customizer display Menus, although the theme not support menus

Reported by: elisa-demonki's profile elisa-demonki Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.9
Component: Customize Keywords: needs-patch has-screenshots
Focuses: Cc:


The Customizer display the panel Menus, although the theme not support widgets or menus.

Attachments (1)

001513-Customize_.png (5.1 KB) - added by elisa-demonki 7 years ago.

Download all attachments as: .zip

Change History (9)

7 years ago


#1 @swissspidy
7 years ago

Hey there,

Thanks for your report and welcome to WordPress Trac! Please note that menus can also be used in widgets. Theme do not need to add support for menus in order for you to use that functionality.

#2 @elisa-demonki
7 years ago

  • Severity changed from normal to minor

Thank you Swissspidy :)
Yes, the theme do not support widgets, too. (Menus are correct not display in admin menu.)

#3 @elisa-demonki
7 years ago

  • Severity changed from minor to normal

This ticket was mentioned in Slack in #core by helen. View the logs.

7 years ago

#5 @helen
7 years ago

  • Keywords reporter-feedback added

Hi @elisa-demonki - is this new to 4.7 or has it been this way for a while?

#6 @westonruter
7 years ago

  • Keywords needs-patch added; reporter-feedback removed
  • Milestone changed from Awaiting Review to Future Release
  • Version changed from trunk to 3.9

@elisa-demonki I just checked in 4.6 and the issue is there as well. The WP_Customize_Widgets and WP_Customize_Nav_Menus classes need to be checking for widgets and nav-menus theme support respectively before they start adding their extensions. Note that the constructors for each will need to be carefully refactored to move hooks to a later point when after_setup_theme is called. Either this, or at the very least the active_callback can at the very last moment return false for these two panels if the theme support is not present. But it would seem preferable to short-circuit the components entirely when possible.

@elisa-demonki For the time being, you can add a plugin (not in your theme, which is loaded too late) which short-circuits these components from being loaded by doing:

add_filter( 'customize_loaded_components', function( $components ) {
    return array_filter( $components, function( $component ) {
        return 'widgets' !== $component && 'nav_menus' !== $component;
    } );
} );

This filter was introduced in #33552.

#7 @desrosj
5 years ago

  • Keywords has-screenshots added

#8 @celloexpressions
3 years ago

#39449 was marked as a duplicate.

Note: See TracTickets for help on using tickets.