[wp-trac] [WordPress Trac] #44321: REST API: Expose revision count and last revision ID on Post response
WordPress Trac
noreply at wordpress.org
Thu Jun 7 00:07:27 UTC 2018
#44321: REST API: Expose revision count and last revision ID on Post response
-------------------------+-------------------------------------------------
Reporter: | Owner: (none)
danielbachhuber |
Type: enhancement | Status: new
Priority: normal | Milestone: 4.9.8
Component: REST API | Version:
Severity: normal | Keywords: needs-patch dev-feedback needs-
Focuses: | unit-tests
-------------------------+-------------------------------------------------
A Post in the Gutenberg needs access to:
* Total number of revisions.
* Last revision ID.
This data is important for revisions UI in the Post Settings section.
At the moment, the data is exposed in a pretty hacky manner:
{{{
"ping_status": "open",
"revisions": {
"count": 2,
"last_id": 3
},
"slug": "foo-bar-post",
}}}
Is there a better way of exposing this data? I don't have a strong opinion
but maybe it'd be better on `_links`.
See https://github.com/WordPress/gutenberg/pull/3233/files#diff-
9dfc2b70ad1c71918441461179054b0bR363
From https://github.com/WordPress/gutenberg/issues/3258
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44321>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list