has_custom_header()WP 4.7.0

Check whether a custom header is set or not.

1 time — 0.000148 sec (fast) | 50000 times — 2.97 sec (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();

Changelog

Since 4.7.0 Introduced.

Code of has_custom_header() WP 5.9.3

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

	return false;
}