Skip to content

Commit

Permalink
Block Editor: Preload settings and templates permissions.
Browse files Browse the repository at this point in the history
This is a path for following changes in the Gutenberg plugin:
* [WordPress/gutenberg#42209 #42209: Post Editor: Preload templates post type permissions]
* [WordPress/gutenberg#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
  • Loading branch information
SergeyBiryukov committed Sep 6, 2022
1 parent 18e1e81 commit 9c45c90
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/wp-admin/edit-form-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ static function( $classes ) {
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 );
Expand Down

0 comments on commit 9c45c90

Please sign in to comment.