Skip to content

Commit

Permalink
Section Styles: Prevent flash of variation style updates.
Browse files Browse the repository at this point in the history
This is fixed by preloading the styles.

Fixes #61589.
Fixes #6989.
See WordPress/gutenberg#63172.

Props aaronrobertshaw, andrewserong, ramonopoly.



git-svn-id: https://develop.svn.wordpress.org/trunk@58690 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
ellatrix committed Jul 9, 2024
1 parent ebe6f5a commit 5c45439
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/wp-admin/edit-form-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 5c45439

Please sign in to comment.