Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Editor: Optimize preload paths for post and site editors.
This patch optimizes preload paths in post and site editors so that they match the real requests: - Remove the `/` preload as the payload is very big and the response is not needed on any critical path. - Modify the preloaded path for `/wp/v2/taxonomies` so that it corresponds to what `loadTaxonomyEntities` requests. After Gutenberg PR 37685 was merged to core, these preloads need to be modified to use `context=view` instead of `context=edit`. - Modify the `/wp/v2/users/me` path so that it matches the real request (no query params). - Add a preload of `/wp/v2/settings` because it is requested on critical path (editor boot). Site editor already preloads this, the changeset is only adding it to the post editor. This is related to Gutenberg PR 39256 which introduces compatibility code to modify the preload paths with a filter, when the Gutenberg plugin is active. See WordPress/gutenberg#39256. Props jsnajdr, noisysocks. Merges [52995] to the 5.9 branch. Built from https://develop.svn.wordpress.org/branches/5.9@53005 git-svn-id: http://core.svn.wordpress.org/branches/5.9@52594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Loading branch information