Warning: This function has been deprecated. Use wp_get_theme() instead.

get_theme( string $theme ): array|null

Retrieve theme data.


Description

Top ↑

See also


Top ↑

Parameters

$theme string Required
Theme name.

Top ↑

Return

array|null Null, if theme name does not exist. Theme data, if exists.


Top ↑

Source

File: wp-includes/deprecated.php. View all references

function get_theme( $theme ) {
	_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme( $stylesheet )' );

	$themes = get_themes();
	if ( is_array( $themes ) && array_key_exists( $theme, $themes ) )
		return $themes[ $theme ];
	return null;
}


Top ↑

Changelog

Changelog
Version Description
3.4.0 Use wp_get_theme()
1.5.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.