Definition:
function wp_remote_retrieve_header(&$response, $header) {}
Retrieve a single header by name from the raw response.
Parameters
- array $response
- string $header: Header name to retrieve value from.
- &$response
Return values
returns:The header value. Empty string on if incorrect parameter given, or if the header doesn’t exist.
Source code
function wp_remote_retrieve_header(&$response, $header) { if ( is_wp_error($response) || ! isset($response['headers']) || ! is_array($response['headers'])) return ''; if ( array_key_exists($header, $response['headers']) ) return $response['headers'][$header]; return ''; }
4045
No comments yet... Be the first to leave a reply!