Skip to content

Commit

Permalink
REST API: Do not set sidebar status to 'active' when using classic th…
Browse files Browse the repository at this point in the history
…eme (#46966)
  • Loading branch information
noisysocks authored and fullofcaffeine committed Jan 9, 2023
1 parent b1cd4fa commit 4a781f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/compat/wordpress-6.2/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );

0 comments on commit 4a781f9

Please sign in to comment.