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.
Built from https://develop.svn.wordpress.org/trunk@54084
  • Loading branch information
SergeyBiryukov authored and SergeyBiryukov committed Sep 6, 2022
1 parent da95fcd commit cc35d1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions 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
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-alpha-54083';
$wp_version = '6.1-alpha-54084';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit cc35d1d

Please sign in to comment.