Make WordPress Core

Changeset 19979


Ignore:
Timestamp:
02/22/2012 02:03:59 PM (13 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/theme-install.php

    r19857 r19979  
    269269    foreach ( (array) $themes as $this_theme ) {
    270270        if ( is_array($this_theme) && $this_theme['Stylesheet'] == $api->slug ) {
    271             if ( $this_theme['Version'] == $api->version ) {
     271            if ( version_compare( $this_theme['Version'], $api->version, '=' ) ) {
    272272                $type = 'latest_installed';
    273             } elseif ( $this_theme['Version'] > $api->version ) {
     273            } elseif ( version_compare( $this_theme['Version'], $api->version, '>' ) ) {
    274274                $type = 'newer_installed';
    275275                $newer_version = $this_theme['Version'];
Note: See TracChangeset for help on using the changeset viewer.