Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-http-requests-response.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function set_data( $data ) {
*
* @since 4.6.0
*
* @return WP_HTTP_Cookie[] List of cookie objects.
* @return WP_Http_Cookie[] List of cookie objects.
*/
public function get_cookies() {
$cookies = array();
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-http.php
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ public static function processHeaders( $headers, $url = '' ) { // phpcs:ignore W
*/
public static function buildCookieHeader( &$r ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
if ( ! empty( $r['cookies'] ) ) {
// Upgrade any name => value cookie pairs to WP_HTTP_Cookie instances.
// Upgrade any name => value cookie pairs to WP_Http_Cookie instances.
foreach ( $r['cookies'] as $name => $value ) {
if ( ! is_object( $value ) ) {
$r['cookies'][ $name ] = new WP_Http_Cookie(
Expand Down
16 changes: 14 additions & 2 deletions src/wp-includes/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,20 @@ function wp_safe_remote_head( $url, $args = array() ) {
* @param string $url URL to retrieve.
* @param array $args Optional. Request arguments. Default empty array.
* See WP_Http::request() for information on accepted arguments.
* @return array|WP_Error The response array or a WP_Error on failure.
* See WP_Http::request() for information on return value.
* @return array|WP_Error {
* The response array or a WP_Error on failure.
*
* @type string[] $headers Array of response headers keyed by their name.
* @type string $body Response body.
* @type array $response {
* Data about the HTTP response.
*
* @type int|false $code HTTP response code.
* @type string|false $message HTTP response message.
* }
* @type WP_Http_Cookie[] $cookies Array of response cookies.
* @type WP_HTTP_Requests_Response|null $http_response Raw HTTP response object.
* }
*/
function wp_remote_request( $url, $args = array() ) {
$http = _wp_http_get_object();
Expand Down
Loading