[wp-trac] [WordPress Trac] #35329: Permit rest_do_request() to be used in non-REST API contexts

WordPress Trac noreply at wordpress.org
Fri Jan 15 23:17:37 UTC 2016


#35329: Permit rest_do_request() to be used in non-REST API contexts
----------------------------------------+------------------
 Reporter:  danielbachhuber             |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  4.5
Component:  REST API                    |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  needs-unit-tests has-patch  |     Focuses:
----------------------------------------+------------------
Changes (by swissspidy):

 * keywords:  needs-patch needs-unit-tests => needs-unit-tests has-patch


Comment:

 [attachment:35329.diff] adds the `rest_internal_request()` function
 created by joehoyle and a new `rest_get_server()` function to get (and
 maybe set) the server instance. Not sure if the former is needed, but
 `rest_get_server()` feels like a great idea. Just think of all the places
 where `global $wp_rest_server` wouldn't be needed anymore.

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


More information about the wp-trac mailing list