From 099eb0578eecf79b7f25968011264c9e5d8014ba Mon Sep 17 00:00:00 2001 From: jorgefilipecosta Date: Sat, 14 Sep 2019 16:47:54 +0000 Subject: [PATCH] Block Editor: Add preloading of autosaves. With the introduction of https://github.com/WordPress/gutenberg/pull/7945, the block editor requests autosave data when the editor is loaded. This can be optimized by preloading the request server-side and then passing the request data to the client using the preloading mechanism in editor-form-blocks.php. Props: talldanwp, aduth. Built from https://develop.svn.wordpress.org/trunk@46110 git-svn-id: http://core.svn.wordpress.org/trunk@45922 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-blocks.php | 1 + wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/edit-form-blocks.php b/wp-admin/edit-form-blocks.php index 3fe6463551..e1967dd329 100644 --- a/wp-admin/edit-form-blocks.php +++ b/wp-admin/edit-form-blocks.php @@ -49,6 +49,7 @@ $preload_paths = array( sprintf( '/wp/v2/users/me?post_type=%s&context=edit', $post_type ), array( '/wp/v2/media', 'OPTIONS' ), array( '/wp/v2/blocks', 'OPTIONS' ), + sprintf( '/wp/v2/%s/%d/autosaves?context=edit', $rest_base, $post->ID ), ); /** diff --git a/wp-includes/version.php b/wp-includes/version.php index db9d0bb5c1..fe0e65d510 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-46109'; +$wp_version = '5.3-alpha-46110'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.