Skip to content

Commit

Permalink
Block Editor: Add preloading of autosaves.
Browse files Browse the repository at this point in the history
With the introduction of WordPress/gutenberg#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: http://develop.svn.wordpress.org/trunk@46110 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
jorgefilipecosta committed Sep 14, 2019
1 parent 43a2af0 commit 9f75578
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/wp-admin/edit-form-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
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 ),
);

/**
Expand Down

0 comments on commit 9f75578

Please sign in to comment.