From df6f9bdc6a0b898588be779713c321b122f84b68 Mon Sep 17 00:00:00 2001 From: davidbaumwald Date: Tue, 9 Jul 2024 15:59:16 +0000 Subject: [PATCH] Editor: Prevent flash of block style variation styling in post editor. These changes prevent a flash of style updates for applied block style variations when the global styles data is loaded into the block editor. This is done by preloading the global styles REST API paths which also brings the post and site editors further into line. Reviewed by audrasjb. Merges [58690] to the 6.6 branch. Props aaronrobertshaw, andrewserong, ramonopoly, ellatrix, hellofromTonya. Fixes #61553. Built from https://develop.svn.wordpress.org/branches/6.6@58698 git-svn-id: http://core.svn.wordpress.org/branches/6.6@58100 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-blocks.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/edit-form-blocks.php b/wp-admin/edit-form-blocks.php index dd66aeea90..ecf83f2017 100644 --- a/wp-admin/edit-form-blocks.php +++ b/wp-admin/edit-form-blocks.php @@ -72,6 +72,9 @@ $preload_paths = array( sprintf( '%s/autosaves?context=edit', $rest_path ), '/wp/v2/settings', array( '/wp/v2/settings', 'OPTIONS' ), + '/wp/v2/global-styles/themes/' . get_stylesheet(), + '/wp/v2/themes?context=edit&status=active', + '/wp/v2/global-styles/' . WP_Theme_JSON_Resolver::get_user_global_styles_post_id() . '?context=edit', ); block_editor_rest_api_preload( $preload_paths, $block_editor_context ); diff --git a/wp-includes/version.php b/wp-includes/version.php index b8bda2ce97..9e3a651f6c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-RC2-58697'; +$wp_version = '6.6-RC2-58698'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.