wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_remote_retrieve_headers › WordPress Function

Da2.7.0
Deprecaton/a
wp_remote_retrieve_headers ( $response )
Parametri:
  • (array|WP_Error) $response HTTP response.
    Richiesto:
Vedi:
  • WpOrgRequestsUtilityCaseInsensitiveDictionary
Ritorna:
  • (WpOrgRequestsUtilityCaseInsensitiveDictionary|array) The headers of the response, or empty array if incorrect parameter given.
Definito a:
Codex:
ChangeLog:
  • 4.6.0

Retrieve only the headers from the raw response.



Sorgenti

function wp_remote_retrieve_headers( $response ) {
	if ( is_wp_error( $response ) || ! isset( $response['headers'] ) ) {
		return array();
	}

	return $response['headers'];
}