Changeset 35996
- Timestamp:
- 12/17/2015 06:34:21 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/network/themes.php
r34912 r35996 117 117 } 118 118 119 $ files_to_delete = $theme_info = array();119 $theme_info = array(); 120 120 $theme_translations = wp_get_installed_translations( 'themes' ); 121 121 foreach ( $themes as $key => $theme ) { 122 122 $theme_info[ $theme ] = wp_get_theme( $theme ); 123 124 // Locate all the files in that folder.125 $files = list_files( $theme_info[ $theme ]->get_stylesheet_directory() );126 if ( $files ) {127 $files_to_delete = array_merge( $files_to_delete, $files );128 }129 130 // Add translation files.131 $theme_slug = $theme_info[ $theme ]->get_stylesheet();132 if ( ! empty( $theme_translations[ $theme_slug ] ) ) {133 $translations = $theme_translations[ $theme_slug ];134 135 foreach ( $translations as $translation => $data ) {136 $files_to_delete[] = $theme_slug . '-' . $translation . '.po';137 $files_to_delete[] = $theme_slug . '-' . $translation . '.mo';138 }139 }140 123 } 141 124 … … 195 178 <?php submit_button( __( 'No, return me to the theme list' ), 'button', 'submit', false ); ?> 196 179 </form> 197 198 <p><a href="#" onclick="jQuery('#files-list').toggle(); return false;"><?php _e('Click to view entire list of files which will be deleted'); ?></a></p>199 <div id="files-list" style="display:none;">200 <ul class="code">201 <?php202 foreach ( (array) $files_to_delete as $file ) {203 echo '<li>' . esc_html( str_replace( WP_CONTENT_DIR . '/themes', '', $file ) ) . '</li>';204 }205 ?>206 </ul>207 </div>208 180 </div> 209 181 <?php
Note: See TracChangeset
for help on using the changeset viewer.