Editor: Fix preloaded REST API paths
When providing an incorrect path to preload, the `rest_preload_api_request` will silently fail, and nothing will be preloaded. * Fix typo for `wp_template_part` post type preload path for the Site Editor. * Do not preload the `wp_block` post type for post editors. The endpoint doesn't support unbound queries, and the data is no longer needed during editor initialization. Props kirasong, tyxla, mamaduka. Fixes #61884. Built from https://develop.svn.wordpress.org/trunk@58904 git-svn-id: http://core.svn.wordpress.org/trunk@58300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -91,7 +91,7 @@ $preload_paths = array(
|
||||
array( '/wp/v2/media', 'OPTIONS' ),
|
||||
'/wp/v2/types?context=view',
|
||||
'/wp/v2/types/wp_template?context=edit',
|
||||
'/wp/v2/types/wp_template-part?context=edit',
|
||||
'/wp/v2/types/wp_template_part?context=edit',
|
||||
'/wp/v2/templates?context=edit&per_page=-1',
|
||||
'/wp/v2/template-parts?context=edit&per_page=-1',
|
||||
'/wp/v2/themes?context=edit&status=active',
|
||||
|
||||
Reference in New Issue
Block a user