[wp-trac] [WordPress Trac] #39727: REST API: Add $last_request property to WP_REST_Server as per Spy_REST_Server.

WordPress Trac noreply at wordpress.org
Mon Jan 30 20:24:49 UTC 2017


#39727: REST API: Add $last_request property to WP_REST_Server as per
Spy_REST_Server.
--------------------------+------------------------------
 Reporter:  rheinardkorf  |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  REST API      |     Version:  4.7.2
 Severity:  normal        |  Resolution:
 Keywords:  close         |     Focuses:  rest-api
--------------------------+------------------------------
Changes (by jnylen0):

 * keywords:   => close


Comment:

 I think I am -1 on this.  Unit tests should use
 `$request->set_query_param`, and WP code should use
 `$request->get_query_param` or `$request['param_name']`.  If there are
 code paths that are doing something else (like #39696 where
 `WP_REST_Server` checks `$_GET` directly) then they should be converted to
 use regular request parameters instead.

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


More information about the wp-trac mailing list