wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_remote_retrieve_headers › WordPress Function

Od2.7.0
Przestarzałyn/a
wp_remote_retrieve_headers ( $response )
Parametry:
  • (array|WP_Error) $response HTTP response.
    Wymagane: Tak
Zobacz:
  • WpOrgRequestsUtilityCaseInsensitiveDictionary
Powrót:
  • (WpOrgRequestsUtilityCaseInsensitiveDictionary|array) The headers of the response, or empty array if incorrect parameter given.
Zdefiniowane na:
Codex:
Dziennik zmian:
  • 4.6.0

Retrieve only the headers from the raw response.



Źródło

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

	return $response['headers'];
}