Skip to content

Commit

Permalink
revert preload until we work out how to preload
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Sep 17, 2024
1 parent fa30479 commit 1ad99d4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/compat/wordpress-6.7/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,8 @@ function gutenberg_block_editor_preload_paths_6_7( $paths, $context ) {
if ( false !== $reusable_blocks_key ) {
unset( $paths[ $reusable_blocks_key ] );
}

/*
* Preload the global styles post data in the post editor.
* This is required for non-admin users without access to the 'view' context.
*/
$paths[] = '/wp/v2/global-styles/' . WP_Theme_JSON_Resolver_Gutenberg::get_user_global_styles_post_id() . '?context=view';
}

return $paths;
}
add_filter( 'block_editor_rest_api_preload_paths', 'gutenberg_block_editor_preload_paths_6_7', 10, 2 );
Expand Down

0 comments on commit 1ad99d4

Please sign in to comment.