# get_themes()

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

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

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

## Сигнатура

```php
get_themes(): array
```

## Описание

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

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

`array`

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

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

```php
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.

## Связанные

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

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