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
This commit is contained in:
Greg Ziółkowski 2023-03-01 11:41:53 +00:00
parent 0bbf09f496
commit 7a8ea502cf

View File

@ -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,