HTTP: Document that the return value of wp_remote_retrieve_headers() changed from a simple array to an object which implements ArrayAccess.

Props mrahmadawais, sudar, swissspidy.
Fixes #37722


git-svn-id: https://develop.svn.wordpress.org/trunk@38730 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2016-10-05 03:50:54 +00:00
parent 1bd6d19f80
commit b03af1ee40
2 changed files with 9 additions and 5 deletions
+4 -1
View File
@@ -208,9 +208,12 @@ function wp_remote_head($url, $args = array()) {
* Retrieve only the headers from the raw response.
*
* @since 2.7.0
* @since 4.6.0 Return value changed from an array to an Requests_Utility_CaseInsensitiveDictionary instance.
*
* @see \Requests_Utility_CaseInsensitiveDictionary
*
* @param array $response HTTP response.
* @return array The headers of the response. Empty array if incorrect parameter given.
* @return array|\Requests_Utility_CaseInsensitiveDictionary The headers of the response. Empty array if incorrect parameter given.
*/
function wp_remote_retrieve_headers( $response ) {
if ( is_wp_error( $response ) || ! isset( $response['headers'] ) ) {