A WordPress-centric search engine for devs and theme authors



wp_remote_retrieve_body ›

Since2.7.0
Deprecatedn/a
wp_remote_retrieve_body ( $response )
Parameters:
  • (array) $response HTTP response.
    Required: Yes
Returns:
  • (string) The body of the response. Empty string if no body or incorrect parameter given.
Defined at:
Codex:

Retrieve only the body from the raw response.



Source

function wp_remote_retrieve_body( $response ) {
	if ( is_wp_error( $response ) || ! isset( $response['body'] ) ) {
		return '';
	}

	return $response['body'];
}