@@ -209,7 +209,6 @@ function get_default_block_editor_settings() {
209209 'disableCustomColors ' => get_theme_support ( 'disable-custom-colors ' ),
210210 'disableCustomFontSizes ' => get_theme_support ( 'disable-custom-font-sizes ' ),
211211 'disableCustomGradients ' => get_theme_support ( 'disable-custom-gradients ' ),
212- 'disableLayoutStyles ' => get_theme_support ( 'disable-layout-styles ' ),
213212 'enableCustomLineHeight ' => get_theme_support ( 'custom-line-height ' ),
214213 'enableCustomSpacing ' => get_theme_support ( 'custom-spacing ' ),
215214 'enableCustomUnits ' => get_theme_support ( 'custom-units ' ),
@@ -418,18 +417,6 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex
418417 $ block_classes ['css ' ] = $ actual_css ;
419418 $ global_styles [] = $ block_classes ;
420419 }
421- } else {
422- // If there is no `theme.json` file, ensure base layout styles are still available.
423- $ block_classes = array (
424- 'css ' => 'base-layout-styles ' ,
425- '__unstableType ' => 'base-layout ' ,
426- 'isGlobalStyles ' => true ,
427- );
428- $ actual_css = wp_get_global_stylesheet ( array ( $ block_classes ['css ' ] ) );
429- if ( '' !== $ actual_css ) {
430- $ block_classes ['css ' ] = $ actual_css ;
431- $ global_styles [] = $ block_classes ;
432- }
433420 }
434421
435422 $ editor_settings ['styles ' ] = array_merge ( $ global_styles , get_block_editor_theme_styles () );
@@ -487,23 +474,9 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex
487474 $ editor_settings ['enableCustomSpacing ' ] = $ editor_settings ['__experimentalFeatures ' ]['spacing ' ]['padding ' ];
488475 unset( $ editor_settings ['__experimentalFeatures ' ]['spacing ' ]['padding ' ] );
489476 }
490- if ( isset ( $ editor_settings ['__experimentalFeatures ' ]['spacing ' ]['customSpacingSize ' ] ) ) {
491- $ editor_settings ['disableCustomSpacingSizes ' ] = ! $ editor_ettings ['__experimentalFeatures ' ]['spacing ' ]['customSpacingSize ' ];
492- unset( $ editor_settings ['__experimentalFeatures ' ]['spacing ' ]['customSpacingSize ' ] );
493- }
494- if ( isset ( $ editor_settings ['__experimentalFeatures ' ]['spacing ' ]['spacingSizes ' ] ) ) {
495- $ spacing_sizes_by_origin = $ editor_settings ['__experimentalFeatures ' ]['spacing ' ]['spacingSizes ' ];
496- $ editor_settings ['spacingSizes ' ] = isset ( $ spacing_sizes_by_origin ['custom ' ] ) ?
497- $ spacing_sizes_by_origin ['custom ' ] : (
498- isset ( $ spacing_sizes_by_origin ['theme ' ] ) ?
499- $ spacing_sizes_by_origin ['theme ' ] :
500- $ spacing_sizes_by_origin ['default ' ]
501- );
502- }
503477
504478 $ editor_settings ['__unstableResolvedAssets ' ] = _wp_get_iframed_editor_assets ();
505479 $ editor_settings ['localAutosaveInterval ' ] = 15 ;
506- $ editor_settings ['disableLayoutStyles ' ] = current_theme_supports ( 'disable-layout-styles ' );
507480 $ editor_settings ['__experimentalDiscussionSettings ' ] = array (
508481 'commentOrder ' => get_option ( 'comment_order ' ),
509482 'commentsPerPage ' => get_option ( 'comments_per_page ' ),
0 commit comments