get_allowed_themes()WP 3.0.0

Устарела с версии 3.4.0. Больше не поддерживается и может быть удалена. Используйте wp_get_themes().

Get the allowed themes for the current site.

Хуков нет.

Возвращает

WP_Theme[]. Array of WP_Theme objects keyed by their name.

Использование

get_allowed_themes();

Заметки

Список изменений

С версии 3.0.0 Введена.
Устарела с 3.4.0 Use wp_get_themes()

Код get_allowed_themes() WP 6.5.2

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;
}