Advertisements

wp_remote_retrieve_response_code

Definition:
function wp_remote_retrieve_response_code(&$response) {}

Retrieve only the response code from the raw response.
Will return an empty array if incorrect parameter value is given.

Parameters

  • array $response: HTTP response.
  • &$response

Return values

returns:the response code. Empty string on incorrect parameter given.

Source code

function wp_remote_retrieve_response_code(&$response) {

	if ( is_wp_error($response) || ! isset($response['response']) || ! is_array($response['response']))

		return '';



	return $response['response']['code'];

}

4049

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: