Changeset 20029 for trunk/wp-includes/update.php
- Timestamp:
- 02/28/2012 09:24:44 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/update.php
r20000 r20029 236 236 return false; 237 237 238 if ( !function_exists( 'get_themes' ) ) 239 require_once( ABSPATH . 'wp-includes/theme.php' ); 240 241 $installed_themes = get_themes( ); 238 $installed_themes = wp_get_themes(); 242 239 $last_update = get_site_transient( 'update_themes' ); 243 240 if ( ! is_object($last_update) ) … … 246 243 $themes = array(); 247 244 $checked = array(); 248 $exclude_fields = array('Template Files', 'Stylesheet Files', 'Status', 'Theme Root', 'Theme Root URI', 'Template Dir', 'Stylesheet Dir', 'Description', 'Tags', 'Screenshot');249 245 250 246 // Put slug of current theme into request. 251 247 $themes['current_theme'] = get_option( 'stylesheet' ); 252 248 253 foreach ( (array) $installed_themes as $theme_title => $theme ) { 254 $themes[$theme['Stylesheet']] = array(); 255 $checked[$theme['Stylesheet']] = $theme['Version']; 256 257 $themes[$theme['Stylesheet']]['Name'] = $theme['Name']; 258 $themes[$theme['Stylesheet']]['Version'] = $theme['Version']; 259 260 foreach ( (array) $theme as $key => $value ) { 261 if ( !in_array($key, $exclude_fields) ) 262 $themes[$theme['Stylesheet']][$key] = $value; 263 } 249 foreach ( $installed_themes as $theme ) { 250 $checked[ $theme->get_stylesheet() ] = $theme->get('Version'); 251 252 $themes[ $theme->get_stylesheet() ] = array( 253 'Name' => $theme->get('Name'), 254 'Title' => $theme->get('Name'), 255 'Version' => $theme->get('Version'), 256 'Author' => $theme->get('Author'), 257 'Author URI' => $theme->get('AuthorURI'), 258 'Template' => $theme->get_template(), 259 'Stylesheet' => $theme->get_stylesheet(), 260 ); 264 261 } 265 262
Note: See TracChangeset
for help on using the changeset viewer.