функция
Устаревший since 3.0.0
get_allowed_themes()
Устаревшее.
Помечено устаревшим с версии 3.4.0.
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
get_allowed_themes(): WP_Theme[]
Описание
См. alsowp_get_themes()
Оригинал (английский)
Возвращаемое значение
WP_Theme[]
WP_Theme
Исходный код
wp-admin/includes/deprecated.php:1015
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. |

