WordPress at a glance

has_custom_header() WP 1.0

Check whether a custom header is set or not.

✈ 1 time = 0.000148s = fast | 50000 times = 2.97s = fast PHP 7.1.0, WP 4.7

No Hooks.

Return

true/false. True if a custom header is set. False if not.

Usage

has_custom_header();

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

<?php
function has_custom_header() {
	if ( has_header_image() || ( has_header_video() && is_header_video_active() ) ) {
		return true;
	}

	return false;
}

Related Functions

From tag: custom_header (theme options: video color image)

More from tag: Conditional tags (all)

More from category: Settings (customizer)

No comments
    Hello, !     Log In . Register