Changeset 35995
- Timestamp:
- 12/17/2015 06:30:55 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/plugins.php
r35109 r35995 257 257 <div class="wrap"> 258 258 <?php 259 $ files_to_delete = $plugin_info = array();259 $plugin_info = array(); 260 260 $have_non_network_plugins = false; 261 261 $plugin_translations = wp_get_installed_translations( 'plugins' ); … … 264 264 265 265 if ( '.' == $plugin_slug ) { 266 $files_to_delete[] = WP_PLUGIN_DIR . '/' . $plugin;267 266 if ( $data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ) ) { 268 267 $plugin_info[ $plugin ] = $data; … … 273 272 } 274 273 } else { 275 // Locate all the files in that folder.276 $files = list_files( WP_PLUGIN_DIR . '/' . $plugin_slug );277 if ( $files ) {278 $files_to_delete = array_merge( $files_to_delete, $files );279 }280 281 274 // Get plugins list from that folder. 282 275 if ( $folder_plugins = get_plugins( '/' . $plugin_slug ) ) { … … 287 280 $have_non_network_plugins = true; 288 281 } 289 }290 }291 292 // Add translation files.293 if ( ! empty( $plugin_translations[ $plugin_slug ] ) ) {294 $translations = $plugin_translations[ $plugin_slug ];295 296 foreach ( $translations as $translation => $data ) {297 $files_to_delete[] = $plugin_slug . '-' . $translation . '.po';298 $files_to_delete[] = $plugin_slug . '-' . $translation . '.mo';299 282 } 300 283 } … … 354 337 <?php submit_button( __( 'No, return me to the plugin list' ), 'button', 'submit', false ); ?> 355 338 </form> 356 357 <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>358 <div id="files-list" style="display:none;">359 <ul class="code">360 <?php361 foreach ( (array) $files_to_delete as $file ) {362 echo '<li>' . esc_html( str_replace( WP_PLUGIN_DIR, '', $file ) ) . '</li>';363 }364 ?>365 </ul>366 </div>367 339 </div> 368 340 <?php
Note: See TracChangeset
for help on using the changeset viewer.