[wp-trac] [WordPress Trac] #45189: Improve preloading request code

WordPress Trac noreply at wordpress.org
Thu Oct 25 17:41:39 UTC 2018


#45189: Improve preloading request code
--------------------------+-----------------------
 Reporter:  schlessera    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  low           |   Milestone:  5.0
Component:  REST API      |     Version:  5.0
 Severity:  minor         |  Resolution:
 Keywords:  has-patch     |     Focuses:  rest-api
--------------------------+-----------------------
Changes (by danielbachhuber):

 * focuses:   => rest-api


Comment:

 Replying to [comment:1 TimothyBlynJacobs]:
 > If dropping the method exists check, I think it makes sense to drop it
 from `WP_REST_Controller::prepare_response_for_collection()` as well.

 Yes, let's do.

 > I wonder if this was included for BC because the server class is
 filterable, so theoretically someone could be using a server class without
 that method, though I think doing a completely custom class that doesn't
 extend `WP_REST_Server` is probably something that shouldn't/isn't
 supported anyways.

 There are a ton of `WP_REST_Server` methods in use so, if someone is
 filtering the server, they need to implement all methods that could be
 used. I'm not concerned about BC here.

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


More information about the wp-trac mailing list