[wp-trac] [WordPress Trac] #44321: REST API: Expose revision count and last revision ID on Post response

WordPress Trac noreply at wordpress.org
Fri Jun 22 13:18:53 UTC 2018


#44321: REST API: Expose revision count and last revision ID on Post response
-----------------------------------------------------+---------------------
 Reporter:  danielbachhuber                          |       Owner:  (none)
     Type:  enhancement                              |      Status:  new
 Priority:  normal                                   |   Milestone:  4.9.8
Component:  REST API                                 |     Version:
 Severity:  normal                                   |  Resolution:
 Keywords:  dev-feedback needs-unit-tests has-patch  |     Focuses:
-----------------------------------------------------+---------------------

Comment (by danielbachhuber):

 > We should also only expose this data when `context=edit` (which is a
 deficiency in the current Gutenberg implementation).

 Ah, this isn't possible because `$request` isn't passed through to
 `prepare_links()`.

 I suppose it's a non-issue to include the revision id in public data. In
 theory, this could be deduced by iterating ids on the revisions endpoint
 and looking at `401` vs `404` response headers. However, the revision
 count isn't public data. I don't see any issues with disclosing it, but
 something worth noting at the least.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44321#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list