функция Устаревший since 1.5.0

get_themes()

Устаревшее. Помечено устаревшим с версии 3.4.0.

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

Сигнатура

get_themes(): array

Описание

Тема считается неисправной, если у неё нет родительской темы и отсутствует style.css и/или index.php. Если у темы есть родительская тема, то она неисправна при отсутствии style.css; index.php необязателен.
См. alsowp_get_themes()

Оригинал (английский)

The theme is broken, if it doesn’t have a parent theme and is missing either style.css and, or index.php. If the theme has a parent theme then it is broken, if it is missing style.css; index.php is optional.

See also

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

array

Исходный код

wp-includes/deprecated.php:2913

function get_themes() {
	_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_themes()' );

	global $wp_themes;
	if ( isset( $wp_themes ) )
		return $wp_themes;

	$themes = wp_get_themes();
	$wp_themes = array();

	foreach ( $themes as $theme ) {
		$name = $theme->get('Name');
		if ( isset( $wp_themes[ $name ] ) )
			$wp_themes[ $name . '/' . $theme->get_stylesheet() ] = $theme;
		else
			$wp_themes[ $name ] = $theme;
	}

	return $wp_themes;
}

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

ВерсияОписание
3.4.0 Deprecated. Use wp_get_themes()
1.5.0 Introduced.

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

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