# _custom_logo_header_styles()

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

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

## Сигнатура

```php
_custom_logo_header_styles()
```

## Описание

Добавляет CSS для скрытия текста заголовка при использовании пользовательского логотипа, исходя из настройки в Настройщике.

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

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

```php
function _custom_logo_header_styles() {
	if ( ! current_theme_supports( 'custom-header', 'header-text' )
		&& get_theme_support( 'custom-logo', 'header-text' )
		&& ! get_theme_mod( 'header_text', true )
	) {
		$classes = (array) get_theme_support( 'custom-logo', 'header-text' );
		$classes = array_map( 'sanitize_html_class', $classes );
		$classes = '.' . implode( ', .', $classes );
		?>
		<!-- Custom Logo: hide header text -->
		<style id="custom-logo-css">
			<?php echo $classes; ?> {
				position: absolute;
				clip-path: inset(50%);
			}
		</style>
		<?php
	}
}
```

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

- 4.5.0 — Introduced.

## Связанные

Использует: [`get_theme_support`](https://chugunov.pro/api-wordpress/functions/get_theme_support/), [`get_theme_mod`](https://chugunov.pro/api-wordpress/functions/get_theme_mod/), [`current_theme_supports`](https://chugunov.pro/api-wordpress/functions/current_theme_supports/).

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