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

git-svn-id: http://svn.automattic.com/wordpress/trunk@19979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-02-22 14:03:59 +00:00
parent 346c855a40
commit 097be218c8
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'];
}