[wp-trac] [WordPress Trac] #43316: REST API: Support autosaves

WordPress Trac noreply at wordpress.org
Mon Dec 17 00:24:00 UTC 2018


#43316: REST API: Support autosaves
------------------------------------------------+-----------------------
 Reporter:  kraftbj                             |       Owner:  rmccue
     Type:  enhancement                         |      Status:  closed
 Priority:  normal                              |   Milestone:  5.0
Component:  REST API                            |     Version:
 Severity:  normal                              |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests fixed-5.0  |     Focuses:  rest-api
------------------------------------------------+-----------------------

Comment (by SergeyBiryukov):

 In [changeset:"44250" 44250]:
 {{{
 #!CommitTicketReference repository="" revision="44250"
 REST API: Avoid using 'parent' as path argument name for autosaves.

 When 'parent' is set as the path argument name, it gets passed down
 through to the `create_item()` method and can erroneously reset the
 'parent' value on the post itself. Instead, we rename the argument to 'id'
 and replicate the revision controller's `get_items_permissions_check()` to
 instead reference 'id'.

 Also ensures revision query params (of which there are many) aren't
 exposed as the query params for autosaves (of which there are two).

 Props TimothyBlynJacobs.
 Merges [43897] to trunk.
 See #43316.
 }}}

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


More information about the wp-trac mailing list