From 12995d49e4155a3f8a3ad4f162e72fcf70f80c44 Mon Sep 17 00:00:00 2001 From: gziolo Date: Wed, 1 Mar 2023 11:43:20 +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. Built from https://develop.svn.wordpress.org/trunk@55438 git-svn-id: http://core.svn.wordpress.org/trunk@54971 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/block-editor.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/block-editor.php b/wp-includes/block-editor.php index b42c0c09f0..476d89e984 100644 --- a/wp-includes/block-editor.php +++ b/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, diff --git a/wp-includes/version.php b/wp-includes/version.php index f067e63239..424c4fdc5a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-beta3-55437'; +$wp_version = '6.2-beta3-55438'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.