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
This commit is contained in:
jorgefilipecosta 2019-09-14 16:47:54 +00:00
parent 8316af9198
commit 099eb0578e
2 changed files with 2 additions and 1 deletions

View File

@ -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 ),
);
/**

View File

@ -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.