diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php index 3aead40a7b..71328d0ad5 100644 --- a/src/wp-admin/edit-form-blocks.php +++ b/src/wp-admin/edit-form-blocks.php @@ -131,7 +131,8 @@ $available_templates = ! empty( $available_templates ) ? array_merge( // Editor Styles. $styles = array( array( - 'css' => 'body { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif }', + 'css' => 'body { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif }', + '__unstableType' => 'core', ), ); if ( $editor_styles && current_theme_supports( 'editor-styles' ) ) { @@ -140,15 +141,17 @@ if ( $editor_styles && current_theme_supports( 'editor-styles' ) ) { $response = wp_remote_get( $style ); if ( ! is_wp_error( $response ) ) { $styles[] = array( - 'css' => wp_remote_retrieve_body( $response ), + 'css' => wp_remote_retrieve_body( $response ), + '__unstableType' => 'theme', ); } } else { $file = get_theme_file_path( $style ); if ( is_file( $file ) ) { $styles[] = array( - 'css' => file_get_contents( $file ), - 'baseURL' => get_theme_file_uri( $style ), + 'css' => file_get_contents( $file ), + 'baseURL' => get_theme_file_uri( $style ), + '__unstableType' => 'theme', ); } } diff --git a/src/wp-includes/block-editor.php b/src/wp-includes/block-editor.php index 3234c4ad1f..101cc1ba71 100644 --- a/src/wp-includes/block-editor.php +++ b/src/wp-includes/block-editor.php @@ -283,10 +283,14 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex $theme_json = WP_Theme_JSON_Resolver::get_merged_data( $editor_settings ); if ( WP_Theme_JSON_Resolver::theme_has_support() ) { - $editor_settings['styles'][] = array( 'css' => $theme_json->get_stylesheet( 'block_styles' ) ); + $editor_settings['styles'][] = array( + 'css' => $theme_json->get_stylesheet( 'block_styles' ), + '__unstableType' => 'globalStyles', + ); $editor_settings['styles'][] = array( 'css' => $theme_json->get_stylesheet( 'css_variables' ), '__experimentalNoWrapper' => true, + '__unstableType' => 'globalStyles', ); }