[wp-trac] [WordPress Trac] #50388: REST API: Add action-delete flag to declare delete_post capability for post objects

WordPress Trac noreply at wordpress.org
Fri Mar 12 14:22:07 UTC 2021


#50388: REST API: Add action-delete flag to declare delete_post capability for post
objects
--------------------------------------+-----------------------
 Reporter:  ocean90                   |       Owner:  (none)
     Type:  enhancement               |      Status:  closed
 Priority:  normal                    |   Milestone:
Component:  REST API                  |     Version:
 Severity:  normal                    |  Resolution:  wontfix
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api
--------------------------------------+-----------------------

Comment (by TimothyBlynJacobs):

 We should implement `targetHints`, https://tools.ietf.org/id/draft-
 handrews-json-schema-hyperschema-00.html#rfc.section.6.5.5. Essentially
 we'd add something like this to self links.


 {{{
 {
   "self": [
     {
       "href": "https://example.org/wp-json/wp/v2/posts/1",
       "targetHints": {
         "allow": [
           "GET",
           "PUT",
           "DELETE"
         ]
       }
     }
   ]
 }
 }}}

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


More information about the wp-trac mailing list