get_header_image

Retrieve header image for custom header.

Description

(string|false) get_header_image(); 

Returns (string|false)


Usage

  1. if ( !function_exists( 'get_header_image' ) ) { 
  2. require_once ABSPATH . WPINC . '/theme.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_header_image(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/theme.php  
  1. function get_header_image() { 
  2. $url = get_theme_mod( 'header_image', get_theme_support( 'custom-header', 'default-image' ) ); 
  3.  
  4. if ( 'remove-header' == $url ) 
  5. return false; 
  6.  
  7.  
  8. return esc_url_raw( set_url_scheme( $url ) );