# get_allowed_themes()

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

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

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

## Сигнатура

```php
get_allowed_themes(): WP_Theme[]
```

## Описание

См. alsowp_get_themes()

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

`WP_Theme[]` — WP_Theme

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

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

```php
function get_allowed_themes() {
	_deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'allowed' => true ) )" );

	$themes = wp_get_themes( array( 'allowed' => true ) );

	$wp_themes = array();
	foreach ( $themes as $theme ) {
		$wp_themes[ $theme->get('Name') ] = $theme;
	}

	return $wp_themes;
}
```

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

- 3.4.0 — Deprecated. Use wp_get_themes()
- 3.0.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/).

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