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.

Built from https://develop.svn.wordpress.org/trunk@52622


git-svn-id: http://core.svn.wordpress.org/trunk@52210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
noisysocks 2022-01-24 05:37:01 +00:00
parent 4aaa1803ec
commit 01cb359adc
2 changed files with 2 additions and 1 deletions

View File

@ -420,6 +420,7 @@ final class WP_Customize_Widgets {
'priority' => 110,
'active_callback' => array( $this, 'is_panel_active' ),
'auto_expand_sole_section' => true,
'theme_supports' => 'widgets',
)
);

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.0-alpha-52621';
$wp_version = '6.0-alpha-52622';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.