From 7a8ea502cf430fa5997d00e5079cd7704f1ee2a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Zi=C3=83=C2=B3=C3=85=E2=80=9Akowski?= Date: Wed, 1 Mar 2023 11:41:53 +0000 Subject: [PATCH] Editor: Correctly merge custom CSS into global styles Update the get_block_editor_settings function and merge custom CSS directly into the $global_styles array. Fixes #57833. Props Mamaduka, poena, sakibmd. git-svn-id: https://develop.svn.wordpress.org/trunk@55438 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-editor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/block-editor.php b/src/wp-includes/block-editor.php index b42c0c09f0..476d89e984 100644 --- a/src/wp-includes/block-editor.php +++ b/src/wp-includes/block-editor.php @@ -418,7 +418,7 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex * Add the custom CSS as a separate stylesheet so any invalid CSS * entered by users does not break other global styles. */ - $editor_settings['styles'][] = array( + $global_styles[] = array( 'css' => wp_get_global_styles_custom_css(), '__unstableType' => 'user', 'isGlobalStyles' => true,