Optimize preload paths for post and site editors #2387
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch optimizes preload paths in post and site editor so that they match the real requests:
/
preload as the payload is very big and the response is not needed on any critical path/wp/v2/taxonomies
so that it corresponds to whatloadTaxonomyEntities
requests. After Gutenberg version that ships the Load the entities list using the view context gutenberg#37685 patch is merged to core, these preloads will need to be further modified to usecontext=view
instead ofcontext=edit
./wp/v2/users/me
path so that it matches the real request (no query params)/wp/v2/settings
because it's requested on critical path (editor boot). Site editor already preloads this, we're just adding it to the post editor.This is companion to Gutenberg PR WordPress/gutenberg#39256 which introduces compat code to modify the preload paths with a filter, when a Gutenberg plugin is active.
Fixes https://core.trac.wordpress.org/ticket/55337