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.


git-svn-id: https://develop.svn.wordpress.org/trunk@52622 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Robert Anderson
2022-01-24 05:35:11 +00:00
parent 141815988a
commit aba29c2421

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',
)
);