From 51bb4db6227a21472847ad99f15d3ca6ee331d65 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 17 Dec 2015 18:35:26 +0000 Subject: [PATCH] Network Admin: Remove the list of files which will be deleted when deleting a theme. Fixes #34439. Built from https://develop.svn.wordpress.org/trunk@35996 git-svn-id: http://core.svn.wordpress.org/trunk@35961 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/network/themes.php | 30 +----------------------------- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/wp-admin/network/themes.php b/wp-admin/network/themes.php index 958bd7e963..34a1a9afd5 100644 --- a/wp-admin/network/themes.php +++ b/wp-admin/network/themes.php @@ -116,27 +116,10 @@ if ( $action ) { exit; } - $files_to_delete = $theme_info = array(); + $theme_info = array(); $theme_translations = wp_get_installed_translations( 'themes' ); foreach ( $themes as $key => $theme ) { $theme_info[ $theme ] = wp_get_theme( $theme ); - - // Locate all the files in that folder. - $files = list_files( $theme_info[ $theme ]->get_stylesheet_directory() ); - if ( $files ) { - $files_to_delete = array_merge( $files_to_delete, $files ); - } - - // Add translation files. - $theme_slug = $theme_info[ $theme ]->get_stylesheet(); - if ( ! empty( $theme_translations[ $theme_slug ] ) ) { - $translations = $theme_translations[ $theme_slug ]; - - foreach ( $translations as $translation => $data ) { - $files_to_delete[] = $theme_slug . '-' . $translation . '.po'; - $files_to_delete[] = $theme_slug . '-' . $translation . '.mo'; - } - } } include(ABSPATH . 'wp-admin/update.php'); @@ -194,17 +177,6 @@ if ( $action ) {
- -

-