Commit f93ce52283 for wordpress.org
commit f93ce52283e423f3d24d0c1f8b9ab4fa346b9c12
Author: ntsekouras <ntsekouras@git.wordpress.org>
Date: Wed Nov 25 08:08:55 2026 +0000
Editor: Update the post editor preload paths for the DataForm inspector.
The DataForm-based inspector requests the form config of the post type on load, so preload `/wp/v2/view-config` with `_fields=form`. Remove the preload of the post author user, which was only requested by the previous author panel.
See https://github.com/WordPress/gutenberg/pull/85081.
Developed in https://github.com/WordPress/wordpress-develop/pull/14494.
Props ntsekouras, oandregal, mamaduka.
Fixes #66339.
Built from https://develop.svn.wordpress.org/trunk@65772
git-svn-id: http://core.svn.wordpress.org/trunk@64801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-admin/edit-form-blocks.php b/wp-admin/edit-form-blocks.php
index 820424fb3c..6585fbc2d6 100644
--- a/wp-admin/edit-form-blocks.php
+++ b/wp-admin/edit-form-blocks.php
@@ -121,15 +121,14 @@ $preload_paths = array(
'/wp/v2/templates/lookup?slug=front-page',
'/wp/v2/taxonomies?context=edit',
array( rest_get_route_for_post_type_items( $post_type ), 'OPTIONS' ),
+ /*
+ * The post summary of the inspector requests the form config of the post type
+ * through `useViewConfig` with `fields: [ 'form' ]`, so the path must match
+ * the resulting `_fields=form` request.
+ */
+ '/wp/v2/view-config?kind=postType&name=' . $post_type . '&_fields=form',
);
-if ( post_type_supports( $post_type, 'author' ) && $post->post_author > 0 ) {
- $preload_paths[] = sprintf(
- '/wp/v2/users/%d?context=view&_fields=id,name',
- (int) $post->post_author
- );
-}
-
block_editor_rest_api_preload( $preload_paths, $block_editor_context );
wp_add_inline_script(
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 8369c0585a..fa3ceaf0db 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.3-alpha-65771';
+$wp_version = '7.3-alpha-65772';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.