@@ 258-259 (lines=2) @@ | ||
255 | * @return int|string The response code as an integer. Empty string on incorrect parameter given. |
|
256 | */ |
|
257 | function wp_remote_retrieve_response_code( $response ) { |
|
258 | if ( is_wp_error($response) || ! isset($response['response']) || ! is_array($response['response'])) |
|
259 | return ''; |
|
260 | ||
261 | return $response['response']['code']; |
|
262 | } |
|
@@ 275-276 (lines=2) @@ | ||
272 | * @return string The response message. Empty string on incorrect parameter given. |
|
273 | */ |
|
274 | function wp_remote_retrieve_response_message( $response ) { |
|
275 | if ( is_wp_error($response) || ! isset($response['response']) || ! is_array($response['response'])) |
|
276 | return ''; |
|
277 | ||
278 | return $response['response']['message']; |
|
279 | } |