Skip to content

Commit

Permalink
Revert "Move wp-block-library-theme inside current_theme_supports logic"
Browse files Browse the repository at this point in the history
This reverts commit 89c3d7d.
  • Loading branch information
mikachan committed Dec 16, 2022
1 parent 89c3d7d commit 0939f34
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,15 +337,7 @@ function gutenberg_register_packages_styles( $styles ) {
global $editor_styles;
if ( current_theme_supports( 'wp-block-styles' ) && ( ! is_array( $editor_styles ) || count( $editor_styles ) === 0 ) ) {
// Include opinionated block styles if the theme supports block styles and no $editor_styles are declared, so the editor never appears broken.

gutenberg_override_style(
$styles,
'wp-block-library-theme',
gutenberg_url( 'build/block-library/theme.css' ),
array(),
$version
);
$styles->add_data( 'wp-block-library-theme', 'rtl', 'replace' );
$wp_edit_blocks_dependencies[] = 'wp-block-library-theme';
}

gutenberg_override_style(
Expand Down Expand Up @@ -375,6 +367,15 @@ function gutenberg_register_packages_styles( $styles ) {
);
$styles->add_data( 'wp-edit-blocks', 'rtl', 'replace' );

gutenberg_override_style(
$styles,
'wp-block-library-theme',
gutenberg_url( 'build/block-library/theme.css' ),
array(),
$version
);
$styles->add_data( 'wp-block-library-theme', 'rtl', 'replace' );

gutenberg_override_style(
$styles,
'wp-list-reusable-blocks',
Expand Down

0 comments on commit 0939f34

Please sign in to comment.