# wp_typography_get_css_variable_inline_style()

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

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

> Устаревший элемент. Помечен устаревшим с версии 6.1.0.

## Сигнатура

```php
wp_typography_get_css_variable_inline_style( array $attributes, string $feature, string $css_property ): string
```

## Описание

См. alsowp_style_engine_get_styles()

## Параметры

- `$attributes` `array` — обязательный. Атрибуты блока.
- `$feature` `string` — обязательный. Ключ возможности внутри типографских стилей.
- `$css_property` `string` — обязательный. Слаг CSS-свойства, которое задаёт встроенный стиль.

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

`string`

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

Файл: `wp-includes/deprecated.php:4493`

```php
function wp_typography_get_css_variable_inline_style( $attributes, $feature, $css_property ) {
	_deprecated_function( __FUNCTION__, '6.1.0', 'wp_style_engine_get_styles()' );

	// Retrieve current attribute value or skip if not found.
	$style_value = _wp_array_get( $attributes, array( 'style', 'typography', $feature ), false );
	if ( ! $style_value ) {
		return;
	}

	// If we don't have a preset CSS variable, we'll assume it's a regular CSS value.
	if ( ! str_contains( $style_value, "var:preset|{$css_property}|" ) ) {
		return sprintf( '%s:%s;', $css_property, $style_value );
	}

	/*
	 * We have a preset CSS variable as the style.
	 * Get the style value from the string and return CSS style.
	 */
	$index_to_splice = strrpos( $style_value, '|' ) + 1;
	$slug            = substr( $style_value, $index_to_splice );

	// Return the actual CSS inline style e.g. `text-decoration:var(--wp--preset--text-decoration--underline);`.
	return sprintf( '%s:var(--wp--preset--%s--%s);', $css_property, $css_property, $slug );
}
```

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

- 6.1.0 — Deprecated. Use wp_style_engine_get_styles() introduced in 6.1.0.
- 5.8.0 — Introduced.

## Связанные

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

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