WordPress at a glance

has_custom_header() WP 1.0

Check whether a custom header is set or not.

Возвращает

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

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

No Hooks.

Usage

has_custom_header();

Список изменений

С версии 4.7.0 Введена.

Code of has_custom_header() WP 5.5.1

wp-includes/theme.php
<?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
    Log In . Register