Section Styles: Prevent flash of variation style updates.

This is fixed by preloading the styles.

Fixes #61589.
Fixes https://github.com/WordPress/wordpress-develop/pull/6989.
See https://github.com/WordPress/gutenberg/pull/63172.

Props aaronrobertshaw, andrewserong, ramonopoly.


Built from https://develop.svn.wordpress.org/trunk@58690


git-svn-id: http://core.svn.wordpress.org/trunk@58092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ellatrix 2024-07-09 10:02:21 +00:00
parent bb14ea362e
commit 5e060bc838
2 changed files with 4 additions and 1 deletions

View File

@ -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 );

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.7-alpha-58689';
$wp_version = '6.7-alpha-58690';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.