Uses
| Uses | Description |
|---|---|
| wp-includes/load.php: is_wp_error() | Check whether variable is a WordPress Error. |
Retrieve only the headers from the raw response.
(array|WP_Error) (Required) HTTP response.
(array|Requests_Utility_CaseInsensitiveDictionary) The headers of the response. Empty array if incorrect parameter given.
File: wp-includes/http.php
function wp_remote_retrieve_headers( $response ) {
if ( is_wp_error( $response ) || ! isset( $response['headers'] ) ) {
return array();
}
return $response['headers'];
} | Version | Description |
|---|---|
| 4.6.0 | Return value changed from an array to an Requests_Utility_CaseInsensitiveDictionary instance. |
| 2.7.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_remote_retrieve_headers