requests-(hook)
Transforms a native Request hook to a WordPress action.
This action maps Requests internal hook to a native WordPress action.
Использование
add_action( 'requests-(hook)', 'wp_kama_requests_hook_action', 10, 3 ); /** * Function for `requests-(hook)` action-hook. * * @param array $parameters Parameters from Requests internal hook. * @param array $request Request data in WP_Http format. * @param string $url URL to request. * * @return void */ function wp_kama_requests_hook_action( $parameters, $request, $url ){ // action... }
- $parameters(массив)
- Parameters from Requests internal hook.
- $request(массив)
- Request data in WP_Http format.
- $url(строка)
- URL to request.
Список изменений
С версии 4.7.0 | Введена. |
Где вызывается хук
requests-(hook)
wp-includes/class-wp-http-requests-hooks.php 75
do_action_ref_array( "requests-{$hook}", $parameters, $this->request, $this->url ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores