http_api_curl хук-событиеWP 2.8.0

Fires before the cURL request is executed.

Cookies are not currently handled by the HTTP API. This action allows plugins to handle cookies themselves.

Использование

add_action( 'http_api_curl', 'wp_kama_http_api_curl_action', 10, 3 );

/**
 * Function for `http_api_curl` action-hook.
 * 
 * @param resource $handle      The cURL handle returned by curl_init() (passed by reference).
 * @param array    $parsed_args The HTTP request arguments.
 * @param string   $url         The request URL.
 *
 * @return void
 */
function wp_kama_http_api_curl_action( $handle, $parsed_args, $url ){

	// action...
}
$handle(resource)
The cURL handle returned by curl_init() (passed by reference).
$parsed_args(массив)
The HTTP request arguments.
$url(строка)
The request URL.

Список изменений

С версии 2.8.0 Введена.

Где вызывается хук

WP_Http_Curl::request()
http_api_curl
WP_HTTP_Requests_Hooks::dispatch()
http_api_curl
wp-includes/class-wp-http-curl.php 230
do_action_ref_array( 'http_api_curl', array( &$handle, $parsed_args, $url ) );
wp-includes/class-wp-http-requests-hooks.php 57
do_action_ref_array( 'http_api_curl', array( &$parameters[0], $this->request, $this->url ) );

Где используется хук в WordPress

Использование не найдено.