wp_get_http_headers( string $url, bool $deprecated = false )
Retrieve HTTP Headers from URL.
Description Description
Parameters Parameters
- $url
-
(string) (Required) URL to retrieve HTTP headers from.
- $deprecated
-
(bool) (Optional) Not Used.
Default value: false
Return Return
(bool|string) False on failure, headers on success.
Source Source
File: wp-includes/functions.php
function wp_get_http_headers( $url, $deprecated = false ) { if ( ! empty( $deprecated ) ) { _deprecated_argument( __FUNCTION__, '2.7.0' ); } $response = wp_safe_remote_head( $url ); if ( is_wp_error( $response ) ) { return false; } return wp_remote_retrieve_headers( $response ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
1.5.1 | Introduced. |