From 244c37e81b7234eee0e915d44ad0d13e0ec03417 Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Wed, 3 Jul 2024 15:15:25 +1000 Subject: [PATCH] Section Styles: Prevent flash of variation style updates --- src/wp-admin/edit-form-blocks.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php index dd66aeea90673..ecf83f2017ee6 100644 --- a/src/wp-admin/edit-form-blocks.php +++ b/src/wp-admin/edit-form-blocks.php @@ -72,6 +72,9 @@ static function ( $classes ) { 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 );