wppaste
WordPress

WP_Theme_Install_List_Table::_get_theme_status( stdClass $theme ): string

Since
3.4.0
Source
wp-admin/includes/class-wp-theme-install-list-table.php:555
Checks to see if the theme is already installed.

Parameters

$themestdClass
A WordPress.org Theme API object.

Return

string
Theme status.

Uses · 1

Used by · 2

Source

	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;	}

History

Introduced in 3.4.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-admin/includes/class-wp-theme-install-list-table.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.