From 4a781f990d92a0141e73c4e3493cf961a2aba594 Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Tue, 10 Jan 2023 05:31:21 +1100 Subject: [PATCH] REST API: Do not set sidebar status to 'active' when using classic theme (#46966) --- lib/compat/wordpress-6.2/rest-api.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/compat/wordpress-6.2/rest-api.php b/lib/compat/wordpress-6.2/rest-api.php index 12f7afda3b4d5d..6161885d020d7c 100644 --- a/lib/compat/wordpress-6.2/rest-api.php +++ b/lib/compat/wordpress-6.2/rest-api.php @@ -111,8 +111,9 @@ function gutenberg_register_global_styles_endpoints() { * @return WP_REST_Response $response Updated response object. */ function gutenberg_modify_rest_sidebars_response( $response ) { - $response->data['status'] = wp_is_block_theme() ? 'inactive' : 'active'; - + if ( wp_is_block_theme() ) { + $response->data['status'] = 'inactive'; + } return $response; } add_filter( 'rest_prepare_sidebar', 'gutenberg_modify_rest_sidebars_response' );