функция since 1.5.0

get_stylesheet_directory()

Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.

Сигнатура

get_stylesheet_directory(): string

Описание

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

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

string

Исходный код

wp-includes/theme.php:201

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.

Что будем искать? Например,Продвижение

Этот сайт использует куки-файлы. Оставаясь на сайте, Вы соглашаетесь на их использование. Для получения дополнительной информации, пожалуйста, ознакомьтесь с политикой в отношении персональных данных.