Advertisements

get_header_image

Definition:
function get_header_image() {}

Retrieve header image for custom header.

Source code

function get_header_image() {

	$default = defined( 'HEADER_IMAGE' ) ? HEADER_IMAGE : '';

	$url = get_theme_mod( 'header_image', $default );



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

}

1406

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: