WP_HTTP: Map internal Requests hooks to WordPress actions.

This change introduces a `requests-{$hook}` action which can be used to hook into Requests hooks, and restores the `http_api_curl` action.

Props rmccue.
Fixes #37843.


git-svn-id: https://develop.svn.wordpress.org/trunk@39212 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2016-11-13 10:35:15 +00:00
parent 4404f32cb5
commit 6ade77e936
3 changed files with 78 additions and 1 deletions

View File

@@ -300,7 +300,7 @@ class WP_Http {
'timeout' => $r['timeout'],
'useragent' => $r['user-agent'],
'blocking' => $r['blocking'],
'hooks' => new Requests_Hooks(),
'hooks' => new WP_HTTP_Requests_Hooks( $url, $r ),
);
// Ensure redirects follow browser behaviour.