Skip to content
Closed
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/compat/wordpress-6.1/template-parts-screen.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ static function( $classes ) {
wp_enqueue_media();

if (
current_theme_supports( 'wp-block-styles' ) ||
current_theme_supports( 'wp-block-styles' ) &&
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be updated in Core in wp-admin/site-editor.php.

( ! is_array( $editor_styles ) || count( $editor_styles ) === 0 )
) {
wp_enqueue_style( 'wp-block-library-theme' );
Expand Down
7 changes: 5 additions & 2 deletions lib/compat/wordpress-6.2/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static function () use ( $style ) {
* Note for core merge: see inline comment on what's been updated.
*/
function gutenberg_resolve_assets_override() {
global $pagenow;
global $pagenow, $editor_styles;

$script_handles = array(
'wp-polyfill',
Expand All @@ -80,7 +80,10 @@ function gutenberg_resolve_assets_override() {
'wp-edit-blocks',
);

if ( current_theme_supports( 'wp-block-styles' ) ) {
if (
current_theme_supports( 'wp-block-styles' ) &&
( ! is_array( $editor_styles ) || count( $editor_styles ) === 0 )
) {
Comment on lines +83 to +86
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be updated in Core in wp-includes/script-loader.php.

$style_handles[] = 'wp-block-library-theme';
}

Expand Down