wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_remote_retrieve_headers › WordPress Function

Seit2.7.0
Veraltetn/v
wp_remote_retrieve_headers ( $response )
Parameter:
  • (array|WP_Error) $response HTTP response.
    Erforderlich: Ja
Siehe:
  • WpOrgRequestsUtilityCaseInsensitiveDictionary
Gibt zurück:
  • (WpOrgRequestsUtilityCaseInsensitiveDictionary|array) The headers of the response, or empty array if incorrect parameter given.
Definiert in:
Codex:
Changelog:
  • 4.6.0

Retrieve only the headers from the raw response.



Quellcode

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

	return $response['headers'];
}