http_api_debug
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 | Введена. |
Где вызывается хук
http_api_debug
http_api_debug
wp-includes/class-wp-http.php 441
do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url );
wp-includes/class-wp-http.php 297
do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url );
wp-includes/class-wp-http.php 305
do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url );
wp-includes/class-wp-http.php 322
do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url );
wp-includes/class-wp-http.php 614
do_action( 'http_api_debug', $response, 'response', $class, $args, $url );