WordPress at a glance
function is not described

get_themes() WP 1.5.0

Deprecated from version 3.4.0. It is no longer supported and can be removed in future releases. Use wp_get_themes() instead.

Retrieve list of themes with theme data in theme directory.

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.

No Hooks.


Array. Theme list with theme data.




  • See: wp_get_themes()


Since 1.5.0 Introduced.
Deprecated Since 3.4.0 Use wp_get_themes()

Code of get_themes() WP 5.7

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;
			$wp_themes[ $name ] = $theme;

	return $wp_themes;