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' );

/**
 * Function for `http_api_curl` action-hook.
 * 
 * @param resource $handle The cURL handle returned by curl_init() (passed by reference).
 *
 * @return void
 */
function wp_kama_http_api_curl_action( $handle ){

	// action...
}
$handle(resource)
The cURL handle returned by curl_init() (passed by reference).

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

С версии 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 236
do_action_ref_array( 'http_api_curl', array( &$handle, $parsed_args, $url ) );
wp-includes/class-wp-http-requests-hooks.php 58
do_action_ref_array( 'http_api_curl', array( &$parameters[0], $this->request, $this->url ) );

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

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