http_api_curl
Fires before the cURL request is executed.
Description
Cookies are not currently handled by the HTTP API. This action allows plugins to handle cookies themselves.
Parameters (1)
- 0. $array (array) =>
array( &$handle, $r, $url )
- The array.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'http_api_curl', $array );
- The following example is for adding a hook callback.
- // define the http_api_curl callback
- function action_http_api_curl( $array ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'http_api_curl', 'action_http_api_curl', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'http_api_curl', 'action_http_api_curl', 10, 1 );
Defined (2)
The action is defined in the following location(s).
- /wp-includes/class-wp-http-curl.php
- do_action_ref_array( 'http_api_curl', array( &$handle, $r, $url ) );
- /wp-includes/class-wp-http-requests-hooks.php
- do_action_ref_array( 'http_api_curl', array( &$parameters[0], $this->request, $this->url ) );