Changeset 20037 for trunk/wp-admin/network/themes.php
- Timestamp:
- 02/29/2012 07:50:56 AM (14 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/network/themes.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/network/themes.php
r19684 r20037 111 111 $themes = isset( $_REQUEST['checked'] ) ? (array) $_REQUEST['checked'] : array(); 112 112 113 if ( isset( $themes[ get_option( 'template' ) ] ) ) 114 unset( $themes[ get_option( 'template' ) ] ); 115 if ( isset( $themes[ get_option( 'stylesheet' ) ] ) ) 116 unset( $themes[ get_option( 'stylesheet' ) ] ); 113 unset( $themes[ get_option( 'stylesheet' ) ], $themes[ get_option( 'template' ) ] ); 117 114 118 115 if ( empty( $themes ) ) { … … 121 118 } 122 119 123 $main_theme = get_current_theme();124 120 $files_to_delete = $theme_info = array(); 125 121 foreach ( $themes as $key => $theme ) { 126 $data = get_theme_data( WP_CONTENT_DIR . '/themes/' . $theme . '/style.css' ); 127 if ( $data['Name'] == $main_theme ) { 128 unset( $themes[$key] ); 129 } else { 130 $files_to_delete = array_merge( $files_to_delete, list_files( WP_CONTENT_DIR . "/themes/$theme" ) ); 131 $theme_info[ $theme ] = $data; 132 } 122 $theme_info[ $theme ] = wp_get_theme( $theme ); 123 $files_to_delete = array_merge( $files_to_delete, list_files( $theme_info[ $theme ]->get_stylesheet_directory() ) ); 133 124 } 134 125 … … 156 147 <ul class="ul-disc"> 157 148 <?php foreach ( $theme_info as $theme ) 158 echo '<li>', sprintf( __('<strong>%1$s</strong> by <em>%2$s</em>' ), esc_html( $theme['Name'] ), esc_html( $theme['AuthorName']) ), '</li>'; /* translators: 1: theme name, 2: theme author */ ?>149 echo '<li>', sprintf( __('<strong>%1$s</strong> by <em>%2$s</em>' ), $theme->display('Name'), $theme->display('Author') ), '</li>'; /* translators: 1: theme name, 2: theme author */ ?> 159 150 </ul> 160 151 <p><?php _e('Are you sure you wish to delete these themes?'); ?></p>
Note: See TracChangeset
for help on using the changeset viewer.