# the_custom_header_markup()

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

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

## Сигнатура

```php
the_custom_header_markup()
```

## Описание

В предпросмотре Настройщика div-контейнер выводится всегда.

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

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

```php
function the_custom_header_markup() {
	$custom_header = get_custom_header_markup();
	if ( empty( $custom_header ) ) {
		return;
	}

	echo $custom_header;

	if ( is_header_video_active() && ( has_header_video() || is_customize_preview() ) ) {
		wp_enqueue_script( 'wp-custom-header' );
		wp_localize_script( 'wp-custom-header', '_wpCustomHeaderSettings', get_header_video_settings() );
	}
}
```

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

- 4.7.0 — Introduced.

## Связанные

Использует: [`get_custom_header_markup`](https://chugunov.pro/api-wordpress/functions/get_custom_header_markup/), [`is_header_video_active`](https://chugunov.pro/api-wordpress/functions/is_header_video_active/), [`has_header_video`](https://chugunov.pro/api-wordpress/functions/has_header_video/), [`get_header_video_settings`](https://chugunov.pro/api-wordpress/functions/get_header_video_settings/), [`is_customize_preview`](https://chugunov.pro/api-wordpress/functions/is_customize_preview/), [`wp_localize_script`](https://chugunov.pro/api-wordpress/functions/wp_localize_script/), [`wp_enqueue_script`](https://chugunov.pro/api-wordpress/functions/wp_enqueue_script/).

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