WordPress at a glance

get_header_image() WP 1.0

Retrieve header image for custom header.

Works based on: get_theme_mod()

No Hooks.

Return

String/false.

Usage

get_header_image();

Code of get_header_image: wp-includes/theme.php VER 4.9.8

<?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();

	return esc_url_raw( set_url_scheme( $url ) );
}

Related Functions

From tag: Theme supports (theme_support)

More from tag: custom_header (theme options: video color image)

More from category: Other Theme Functions

No comments
    Hello, !     Log In . Register