Switch language

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




get_header_image [ WordPress Function ]

get_header_image ( No parameters )
Returns:
  • (string)
Defined at:



Retrieve header image for custom header.

Source


<?php
function get_header_image() {
    
$url get_theme_mod'header_image'get_theme_support'custom-header''default-image' ) );

    if ( 
'remove-header' == $url )
        return 
false;

    if ( 
is_random_header_image() )
        
$url get_random_header_image();

    if ( 
is_ssl() )
        
$url str_replace'http://''https://'$url );
    else
        
$url str_replace'https://''http://'$url );

    return 
esc_url_raw$url );
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



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