[wp-trac] [WordPress Trac] #37843: `http_api_curl` hook no longer available for adding custom cURL options

WordPress Trac noreply at wordpress.org
Fri Sep 23 18:49:22 UTC 2016


#37843: `http_api_curl` hook no longer available for adding custom cURL options
--------------------------+-----------------------
 Reporter:  ChaseWiseman  |       Owner:  rmccue
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  4.7
Component:  HTTP API      |     Version:  4.6
 Severity:  major         |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------
Changes (by rmccue):

 * keywords:  needs-patch => has-patch


Comment:

 Added a patch that adds a `requests-{$hook}` dynamic hook for WordPress
 usage of Requests internal hooks. Anything in Requests will be mapped to
 this automatically (e.g. `curl.before_send` will be available as
 `requests-curl.before_send`).

 Additionally, it also maps the `curl.before_send` hook to the old
 `http_api_curl` hook.

 Please note: if you're hooking into this, please consider filtering
 something else, as your code won't work if the user doesn't have cURL
 installed. The point of WP_Http is to abstract the need for cURL away, so
 using this hook is a bad idea.

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


More information about the wp-trac mailing list