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

WordPress Trac noreply at wordpress.org
Thu Oct 25 16:36:34 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         |   Keywords:  has-patch
  Focuses:                |
--------------------------+-----------------------
 The attached patch removes the conditional branching based on the
 existence of the get_compact_response_links() method on the $server
 object, as that method was introduced with WordPress 4.5, and Gutenberg
 requires WordPress 4.9.8 or later.

 Also, it turns the indirect and slow call through call_user_func() into a
 direct method call.

 Note: The call would actually be more correct as a static call
 ($server::get_compact_response_links( $response)), but this notation is
 PHP 5.3+ only.

 The patch is done against 5.0 branch.

 Mirrors [https://github.com/WordPress/gutenberg/pull/11007 Gutenberg PR
 #11007] per request by @danielbachhuber.

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


More information about the wp-trac mailing list