WordPress at Your Fingertips
function is not described

Theme_Upgrader::theme_info() public WP 2.8.0

Get the WP_Theme object for a theme.

{} It's a method of the class: Theme_Upgrader{}

No Hooks.

Return

WP_Theme|false. The theme's info object, or false $theme is not supplied and the last result isn't set.

Usage

$Theme_Upgrader = new Theme_Upgrader();
$Theme_Upgrader->theme_info( $theme );
$theme(string)
The directory name of the theme. This is optional, and if not supplied, the directory name from the last result will be used.
Default: null

Changelog

Since 2.8.0 Introduced.
Since 3.0.0 The $theme argument was added.

Code of Theme_Upgrader::theme_info() WP 5.8.2

public function theme_info( $theme = null ) {
	if ( empty( $theme ) ) {
		if ( ! empty( $this->result['destination_name'] ) ) {
			$theme = $this->result['destination_name'];
		} else {
			return false;
		}
	}

	$theme = wp_get_theme( $theme );
	$theme->cache_delete();

	return $theme;
}