wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_remote_retrieve_response_message › WordPress Function

Desde2.7.0
Obsoleton/a
wp_remote_retrieve_response_message ( $response )
Parâmetros:
  • (array|WP_Error) $response HTTP response.
    Required: Yes
Retorna:
  • (string) The response message. Empty string if incorrect parameter given.
Definido em:
Codex:

Retrieve only the response message from the raw response.

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


Fonte

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

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