- foreach ( (array) $installed_themes as $theme_title => $theme ) {
- $themes[$theme['Stylesheet']] = array();
- $checked[$theme['Stylesheet']] = $theme['Version'];
-
- $themes[$theme['Stylesheet']]['Name'] = $theme['Name'];
- $themes[$theme['Stylesheet']]['Version'] = $theme['Version'];
-
- foreach ( (array) $theme as $key => $value ) {
- if ( !in_array($key, $exclude_fields) )
- $themes[$theme['Stylesheet']][$key] = $value;
- }
+ foreach ( $installed_themes as $theme ) {
+ $checked[ $theme->get_stylesheet() ] = $theme->get('Version');
+
+ $themes[ $theme->get_stylesheet() ] = array(
+ 'Name' => $theme->get('Name'),
+ 'Title' => $theme->get('Name'),
+ 'Version' => $theme->get('Version'),
+ 'Author' => $theme->get('Author'),
+ 'Author URI' => $theme->get('AuthorURI'),
+ 'Template' => $theme->get_template(),
+ 'Stylesheet' => $theme->get_stylesheet(),
+ );