mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 16:21:26 +01:00
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:
parent
346c855a40
commit
097be218c8
@ -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'];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user