Changeset 20029 for trunk/wp-admin/includes/theme-install.php
- Timestamp:
- 02/28/2012 09:24:44 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/theme-install.php
r19979 r20029 266 266 } 267 267 268 $theme s = get_themes();269 foreach ( (array) $themes as $this_theme) {270 if ( is_array($this_theme) && $this_theme['Stylesheet'] == $api->slug) {271 if ( version_compare( $this_theme['Version'], $api->version, '=' ) ) {268 $theme = wp_get_theme( $api->slug ); 269 if ( is_a( $theme, 'WP_Theme' ) ) { 270 switch ( version_compare( $theme->get('Version'), $api->version ) ) { 271 case 0; // equal 272 272 $type = 'latest_installed'; 273 } elseif ( version_compare( $this_theme['Version'], $api->version, '>' ) ) {273 case 1: // installed theme > api version 274 274 $type = 'newer_installed'; 275 $newer_version = $this_theme['Version']; 276 } 277 break; 275 $newer_version = $theme->get('Version'); 278 276 } 279 277 }
Note: See TracChangeset
for help on using the changeset viewer.