From cc35d1d53671e184a588994b25b03a3c3cc94e4a Mon Sep 17 00:00:00 2001 From: SergeyBiryukov Date: Tue, 6 Sep 2022 16:18:11 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@54084 --- wp-admin/edit-form-blocks.php | 2 ++ wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-admin/edit-form-blocks.php b/wp-admin/edit-form-blocks.php index a842facd49..8b07908d61 100644 --- a/wp-admin/edit-form-blocks.php +++ b/wp-admin/edit-form-blocks.php @@ -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 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index a334ccb145..83458ed171 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.