# is_header_video_active()

URL: https://chugunov.pro/api-wordpress/functions/is_header_video_active/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 4.7.0.

## Сигнатура

```php
is_header_video_active(): bool
```

## Описание

Проверяет, можно ли показывать видео произвольной шапки на текущей странице.

## Возвращаемое значение

`bool`

## Исходный код

Файл: `wp-includes/theme.php:1766`

```php
function is_header_video_active() {
	if ( ! get_theme_support( 'custom-header', 'video' ) ) {
		return false;
	}

	$video_active_cb = get_theme_support( 'custom-header', 'video-active-callback' );

	if ( empty( $video_active_cb ) || ! is_callable( $video_active_cb ) ) {
		$show_video = true;
	} else {
		$show_video = call_user_func( $video_active_cb );
	}

	/**
	 * Filters whether the custom header video is eligible to show on the current page.
	 *
	 * @since 4.7.0
	 *
	 * @param bool $show_video Whether the custom header video should be shown. Returns the value
	 *                         of the theme setting for the `custom-header`'s `video-active-callback`.
	 *                         If no callback is set, the default value is that of `is_front_page()`.
	 */
	return apply_filters( 'is_header_video_active', $show_video );
}
```

## История изменений

- 4.7.0 — Introduced.

## Связанные

Использует: [`get_theme_support`](https://chugunov.pro/api-wordpress/functions/get_theme_support/), [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/).
Используется в: [`the_custom_header_markup`](https://chugunov.pro/api-wordpress/functions/the_custom_header_markup/), [`has_custom_header`](https://chugunov.pro/api-wordpress/functions/has_custom_header/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/is_header_video_active/
