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