Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_remote_retrieve_header [ WordPress Function ]

wp_remote_retrieve_header ( $response, $header )
Parameters:
  • (array) $response
  • (string) $header Header name to retrieve value from.
Returns:
  • (string) The header value. Empty string on if incorrect parameter given, or if the header doesn't exist.
Defined at:



Retrieve a single header by name from the raw response.

Source


<?php
function wp_remote_retrieve_header(&$response$header) {
    if ( 
is_wp_error($response) || ! isset($response['headers']) || ! is_array($response['headers']))
        return 
'';

    if ( 
array_key_exists($header$response['headers']) )
        return 
$response['headers'][$header];

    return 
'';
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics