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. git-svn-id: https://develop.svn.wordpress.org/trunk@46110 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e4e1c7380c
commit
31a2e8af87
@ -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 ),
|
||||
);
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user