Theme_Upgrader::theme_info( string $theme = null )

Get the WP_Theme object for a theme.


Parameters Parameters

$theme

(string) (Optional) The directory name of the theme. This is optional, and if not supplied, the directory name from the last result will be used.

Default value: null


Top ↑

Return Return

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



Top ↑

Source Source

File: wp-admin/includes/class-theme-upgrader.php

	public function theme_info( $theme = null ) {

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

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 The $theme argument was added.
2.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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