HTTP API: Improve docs for `wp_remote_retrieve_header` function return value.
This change updates the `@return` docs for `wp_remote_retrieve_header` to specify that an array can also be returned if the requested header key has multiple values. Props robtarr, johnjamesjacoby, felipeelia, hellofromTonya, costdev. Fixes #51736. Built from https://develop.svn.wordpress.org/trunk@52441 git-svn-id: http://core.svn.wordpress.org/trunk@52033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
79a705c8d8
commit
5d9af9adac
|
@ -222,7 +222,8 @@ function wp_remote_retrieve_headers( $response ) {
|
|||
*
|
||||
* @param array|WP_Error $response HTTP response.
|
||||
* @param string $header Header name to retrieve value from.
|
||||
* @return string The header value. Empty string on if incorrect parameter given, or if the header doesn't exist.
|
||||
* @return array|string The header(s) value(s). Array if multiple headers with the same name are retrieved.
|
||||
* Empty string if incorrect parameter given, or if the header doesn't exist.
|
||||
*/
|
||||
function wp_remote_retrieve_header( $response, $header ) {
|
||||
if ( is_wp_error( $response ) || ! isset( $response['headers'] ) ) {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.9-beta4-52440';
|
||||
$wp_version = '5.9-beta4-52441';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue