Use version_compare() when checking installed themes in the theme installer. fixes #20097.

git-svn-id: https://develop.svn.wordpress.org/trunk@19979 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-02-22 14:03:59 +00:00
parent ce89e9f68f
commit 082f9f9739
1 changed files with 2 additions and 2 deletions

View File

@ -268,9 +268,9 @@ function install_theme_information() {
$themes = get_themes();
foreach ( (array) $themes as $this_theme ) {
if ( is_array($this_theme) && $this_theme['Stylesheet'] == $api->slug ) {
if ( $this_theme['Version'] == $api->version ) {
if ( version_compare( $this_theme['Version'], $api->version, '=' ) ) {
$type = 'latest_installed';
} elseif ( $this_theme['Version'] > $api->version ) {
} elseif ( version_compare( $this_theme['Version'], $api->version, '>' ) ) {
$type = 'newer_installed';
$newer_version = $this_theme['Version'];
}