REST API: Autosaves entities should include preview_link
#7179
Labels
Core REST API Task
Task for Core REST API efforts
[Type] Task
Issues or PRs that have been broken down into an individual action to take
Milestone
Related: #2544
In order to preview a published post, we need to create an autosave revision. The preview behavior in Gutenberg relies on the addition of a
preview_link
field to the post endpoint, which callsget_preview_post_link
.gutenberg/lib/rest-api.php
Lines 441 to 478 in 423dbed
This field is not included in the autosaves endpoint return value, however, so it can't be known where the user should be directed on a published post autosave.
Thus, we should:
_links
field (not sure what the standard practice is here)Alternatively, we could attempt to recreate this logic in the client, which relies on:
visibility
field added for taxonomies (Filters out private taxonomies from sidebar UI. #2654, Trac#42707)preview_post_link
The text was updated successfully, but these errors were encountered: