wp_remote_retrieve_response_message( array $response )

Retrieve only the response message from the raw response.


Description

Will return an empty array if incorrect parameter value is given.


Parameters

$response

(array) (Required) HTTP response.


Return

(string) The response message. Empty string on incorrect parameter given.


Source

File: wp-includes/http.php

function wp_remote_retrieve_response_message( $response ) {
	if ( is_wp_error($response) || ! isset($response['response']) || ! is_array($response['response']))
		return '';

	return $response['response']['message'];
}


Changelog

Changelog
Version Description
WP-2.7.0 Introduced.