Docs: Improve documentation for `WP_Http::processHeaders()`.
Document the `@return` value using hash notation. Props marekdedic, valchovski, davidbaumwald, deepaklalwani, thimalw, SergeyBiryukov. Fixes #48350. Built from https://develop.svn.wordpress.org/trunk@48630 git-svn-id: http://core.svn.wordpress.org/trunk@48392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9f841ea7c3
commit
f547eb6174
|
@ -667,17 +667,27 @@ class WP_Http {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform header string into an array.
|
* Transforms header string into an array.
|
||||||
*
|
|
||||||
* If an array is given, then it is assumed to be raw header data with numeric keys with the
|
|
||||||
* headers as the values. No headers must be passed that were already processed.
|
|
||||||
*
|
*
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*
|
*
|
||||||
* @param string|array $headers
|
* @param string|array $headers The original headers. If a string is passed, it will be converted
|
||||||
* @param string $url The URL that was requested.
|
* to an array. If an array is passed, then it is assumed to be
|
||||||
* @return array Processed string headers. If duplicate headers are encountered,
|
* raw header data with numeric keys with the headers as the values.
|
||||||
* then a numbered array is returned as the value of that header-key.
|
* No headers must be passed that were already processed.
|
||||||
|
* @param string $url Optional. The URL that was requested. Default empty.
|
||||||
|
* @return array {
|
||||||
|
* Processed string headers. If duplicate headers are encountered,
|
||||||
|
* then a numbered array is returned as the value of that header-key.
|
||||||
|
*
|
||||||
|
* @type array $response {
|
||||||
|
* @type int $code The response status code. Default 0.
|
||||||
|
* @type string $message The response message. Default empty.
|
||||||
|
* }
|
||||||
|
* @type array $newheaders The processed header data as a multidimensional array.
|
||||||
|
* @type WP_Http_Cookie[] $cookies If the original headers contain the 'Set-Cookie' key,
|
||||||
|
* an array containing `WP_Http_Cookie` objects is returned.
|
||||||
|
* }
|
||||||
*/
|
*/
|
||||||
public static function processHeaders( $headers, $url = '' ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
|
public static function processHeaders( $headers, $url = '' ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
|
||||||
// Split headers, one per array element.
|
// Split headers, one per array element.
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.5-beta3-48629';
|
$wp_version = '5.5-beta3-48630';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue