wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_remote_retrieve_body › WordPress Function

Depuis2.7.0
Dépréciéen/a
wp_remote_retrieve_body ( $response )
Paramètres:
  • (array|WP_Error) $response HTTP response.
    Requis: Oui
Retourne:
  • (string) The body of the response. Empty string if no body or incorrect parameter given.
Défini(e) dans:
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'];
}