From aba29c2421b908b6dcda22bf4d7f1e966a0b6995 Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Mon, 24 Jan 2022 05:35:11 +0000 Subject: [PATCH] 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 --- src/wp-includes/class-wp-customize-widgets.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-includes/class-wp-customize-widgets.php b/src/wp-includes/class-wp-customize-widgets.php index 98a63b4112..8edcd6f1c9 100644 --- a/src/wp-includes/class-wp-customize-widgets.php +++ b/src/wp-includes/class-wp-customize-widgets.php @@ -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', ) );