# wp_enqueue_embed_styles()

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

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

## Сигнатура

```php
wp_enqueue_embed_styles()
```

## Описание

Ставит в очередь подключения CSS в заголовке iframe для встраивания.

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

Файл: `wp-includes/embed.php:1084`

```php
function wp_enqueue_embed_styles() {
	// Back-compat for plugins that disable functionality by unhooking this action.
	if ( ! has_action( 'embed_head', 'print_embed_styles' ) ) {
		return;
	}
	remove_action( 'embed_head', 'print_embed_styles' );

	$suffix = wp_scripts_get_suffix();
	$handle = 'wp-embed-template';
	wp_register_style( $handle, false );
	wp_add_inline_style( $handle, file_get_contents( ABSPATH . WPINC . "/css/wp-embed-template$suffix.css" ) );
	wp_enqueue_style( $handle );
}
```

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

- 6.4.0 — Introduced.

## Связанные

Использует: [`wp_scripts_get_suffix`](https://chugunov.pro/api-wordpress/functions/wp_scripts_get_suffix/), [`wp_register_style`](https://chugunov.pro/api-wordpress/functions/wp_register_style/), [`wp_add_inline_style`](https://chugunov.pro/api-wordpress/functions/wp_add_inline_style/), [`has_action`](https://chugunov.pro/api-wordpress/functions/has_action/), [`remove_action`](https://chugunov.pro/api-wordpress/functions/remove_action/), [`wp_enqueue_style`](https://chugunov.pro/api-wordpress/functions/wp_enqueue_style/).

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