[wp-trac] [WordPress Trac] #45605: REST API: Avoid DB queries from generating sample permalink when possible

WordPress Trac noreply at wordpress.org
Thu Feb 14 05:42:51 UTC 2019


#45605: REST API: Avoid DB queries from generating sample permalink when possible
--------------------------+-----------------------------
 Reporter:  dlh           |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  REST API      |     Version:  5.0
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------
Changes (by dlh):

 * keywords:  has-patch needs-refresh => has-patch


Comment:

 [attachment:"45605.2.diff"] adds the context check to
 `WP_REST_Controller::get_fields_for_response()` and related tests. It also
 removes a call to `trim()` that (I think) is unnecessary now that
 `wp_parse_list()` is in use.

 This new patch combines with [attachment:"45605.diff"] to address the
 original issue described in this ticket. The patches are related in the
 context of the ticket but seemed conceptually separable, so I've kept them
 separate, but I can combine them into one patch if desired.

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


More information about the wp-trac mailing list