функция
since 4.7.0
get_custom_header_markup()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
get_custom_header_markup(): string
Описание
В предпросмотре Настройщика div-контейнер возвращается всегда.
Оригинал (английский)
The container div will always be returned in the Customizer preview.
Возвращаемое значение
string
Исходный код
wp-includes/theme.php:1800
function get_custom_header_markup() {
if ( ! has_custom_header() && ! is_customize_preview() ) {
return '';
}
return sprintf(
'<div id="wp-custom-header" class="wp-custom-header">%s</div>',
get_header_image_tag()
);
}
История изменений
| Версия | Описание |
|---|---|
| 4.7.0 | Introduced. |

