Make WordPress Core

Changeset 52622


Ignore:
Timestamp:
01/24/2022 05:35:11 AM (2 years ago)
Author:
noisysocks
Message:

Customizer: Remove Widgets panel when a theme does not support widgets

By setting 'theme_supports' on the panel, we ensure that the Widgets panel is
removed if a theme does not have support for 'widgets'.

This makes the behaviour of the Widgets and Menus panels consistent.

Follows [52621].
See #54888.
Props hellofromTonya, costdev, peterwilsoncc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-widgets.php

    r52352 r52622  
    421421                'active_callback'          => array( $this, 'is_panel_active' ),
    422422                'auto_expand_sole_section' => true,
     423                'theme_supports'           => 'widgets',
    423424            )
    424425        );
Note: See TracChangeset for help on using the changeset viewer.