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

Fires after an HTTP API response is received and before the response is returned.

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

add_action( 'http_api_debug', 'wp_kama_http_api_debug_action', 10, 5 );

/**
 * Function for `http_api_debug` action-hook.
 * 
 * @param array|WP_Error $response    HTTP response or WP_Error object.
 * @param string         $context     Context under which the hook is fired.
 * @param string         $class       HTTP transport used.
 * @param array          $parsed_args HTTP request arguments.
 * @param string         $url         The request URL.
 *
 * @return void
 */
function wp_kama_http_api_debug_action( $response, $context, $class, $parsed_args, $url ){

	// action...
}
$response(массив|WP_Error)
HTTP response or WP_Error object.
$context(строка)
Context under which the hook is fired.
$class(строка)
HTTP transport used.
$parsed_args(массив)
HTTP request arguments.
$url(строка)
The request URL.

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

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

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

WP_Http::request()
http_api_debug
WP_Http::_dispatch_request()
http_api_debug
wp-includes/class-wp-http.php 422
do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url );
wp-includes/class-wp-http.php 279
do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url );
wp-includes/class-wp-http.php 286
do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url );
wp-includes/class-wp-http.php 303
do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url );
wp-includes/class-wp-http.php 595
do_action( 'http_api_debug', $response, 'response', $class, $args, $url );

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

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