WordPress at Your Fingertips
function is not described

WP_Theme_Install_List_Table::_get_theme_status() private WP 3.4.0

Check to see if the theme is already installed.

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

No Hooks.

Return

String. Theme status.

Usage

// private - for code of main (parent) class only
$result = $this->_get_theme_status( $theme );
$theme(object) (required)
- A WordPress.org Theme API object.

Changelog

Since 3.4.0 Introduced.

Code of WP_Theme_Install_List_Table::_get_theme_status() WP 5.8.2

private function _get_theme_status( $theme ) {
	$status = 'install';

	$installed_theme = wp_get_theme( $theme->slug );
	if ( $installed_theme->exists() ) {
		if ( version_compare( $installed_theme->get( 'Version' ), $theme->version, '=' ) ) {
			$status = 'latest_installed';
		} elseif ( version_compare( $installed_theme->get( 'Version' ), $theme->version, '>' ) ) {
			$status = 'newer_installed';
		} else {
			$status = 'update_available';
		}
	}

	return $status;
}