mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Block Editor: Preload settings and templates permissions.
This is a path for following changes in the Gutenberg plugin: * [https://github.com/WordPress/gutenberg/pull/42209 #42209: Post Editor: Preload templates post type permissions] * [https://github.com/WordPress/gutenberg/pull/42413 #42413: Post Editor: Avoid 403 errors for users with low permissions]. Follow-up to [43815], [44172], [46110], [51962], [52995]. Props Mamaduka, bernhard-reiter, TimothyBlynJacobs. See #56467. git-svn-id: https://develop.svn.wordpress.org/trunk@54084 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -68,8 +68,10 @@ $preload_paths = array(
|
||||
array( rest_get_route_for_post_type_items( 'attachment' ), 'OPTIONS' ),
|
||||
array( rest_get_route_for_post_type_items( 'page' ), 'OPTIONS' ),
|
||||
array( rest_get_route_for_post_type_items( 'wp_block' ), 'OPTIONS' ),
|
||||
array( rest_get_route_for_post_type_items( 'wp_template' ), 'OPTIONS' ),
|
||||
sprintf( '%s/autosaves?context=edit', $rest_path ),
|
||||
'/wp/v2/settings',
|
||||
array( '/wp/v2/settings', 'OPTIONS' ),
|
||||
);
|
||||
|
||||
block_editor_rest_api_preload( $preload_paths, $block_editor_context );
|
||||
|
||||
Reference in New Issue
Block a user