# get_stylesheet_directory()

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

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

## Сигнатура

```php
get_stylesheet_directory(): string
```

## Описание

Возвращает путь к каталогу таблицы стилей активной темы.

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

`string`

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

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

```php
function get_stylesheet_directory() {
	$stylesheet     = get_stylesheet();
	$theme_root     = get_theme_root( $stylesheet );
	$stylesheet_dir = "$theme_root/$stylesheet";

	/**
	 * Filters the stylesheet directory path for the active theme.
	 *
	 * @since 1.5.0
	 *
	 * @param string $stylesheet_dir Absolute path to the active theme.
	 * @param string $stylesheet     Directory name of the active theme.
	 * @param string $theme_root     Absolute path to themes directory.
	 */
	return apply_filters( 'stylesheet_directory', $stylesheet_dir, $stylesheet, $theme_root );
}
```

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

- 6.4.2 — Memoization removed.
- 6.4.0 — Memoizes filter execution so that it only runs once for the current theme.
- 1.5.0 — Introduced.

## Связанные

Использует: [`get_theme_root`](https://chugunov.pro/api-wordpress/functions/get_theme_root/), [`get_stylesheet`](https://chugunov.pro/api-wordpress/functions/get_stylesheet/), [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/).
Используется в: `WP_Debug_Data::get_wp_active_theme`, [`wp_set_template_globals`](https://chugunov.pro/api-wordpress/functions/wp_set_template_globals/), [`get_block_asset_url`](https://chugunov.pro/api-wordpress/functions/get_block_asset_url/), [`wp_theme_has_theme_json`](https://chugunov.pro/api-wordpress/functions/wp_theme_has_theme_json/), `WP_Theme_JSON_Resolver::get_style_variations`, [`wp_generate_block_templates_export_file`](https://chugunov.pro/api-wordpress/functions/wp_generate_block_templates_export_file/), [`_get_block_template_file`](https://chugunov.pro/api-wordpress/functions/_get_block_template_file/), [`_get_block_templates_files`](https://chugunov.pro/api-wordpress/functions/_get_block_templates_files/), `WP_Theme_JSON_Resolver::get_file_path_from_theme`, [`locate_block_template`](https://chugunov.pro/api-wordpress/functions/locate_block_template/), [`resolve_block_template`](https://chugunov.pro/api-wordpress/functions/resolve_block_template/), `WP_Customize_Manager::prepare_starter_content_attachments`, [`get_theme_file_path`](https://chugunov.pro/api-wordpress/functions/get_theme_file_path/), [`get_theme_file_uri`](https://chugunov.pro/api-wordpress/functions/get_theme_file_uri/), [`_load_textdomain_just_in_time`](https://chugunov.pro/api-wordpress/functions/_load_textdomain_just_in_time/), [`get_editor_stylesheets`](https://chugunov.pro/api-wordpress/functions/get_editor_stylesheets/), [`validate_current_theme`](https://chugunov.pro/api-wordpress/functions/validate_current_theme/), [`get_locale_stylesheet_uri`](https://chugunov.pro/api-wordpress/functions/get_locale_stylesheet_uri/), [`load_child_theme_textdomain`](https://chugunov.pro/api-wordpress/functions/load_child_theme_textdomain/), [`wp_templating_constants`](https://chugunov.pro/api-wordpress/functions/wp_templating_constants/).

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