[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 15:04:18 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):

 > To validate an assumption: I haven't checked this, but I'm guessing the
 last revision ID refers to the parent revision of the published post, NOT
 a revision that is equal to the published post?

 Yes. What you've implemented with the patch is the same as what's already
 in Gutenberg.

 `44321.1.diff` looks good to me. My only concern is that
 `wp_get_post_revisions()` might be too heavy for our needs, but I'm not
 sure whether we have a reasonable alternative (aside from a direct SQL
 query).

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


More information about the wp-trac mailing list