From d48b37695655f06b73d5379a899772fcdb8f6c12 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 9 Aug 2008 01:00:27 +0000 Subject: [PATCH] Remove old files. see #5560 git-svn-id: https://develop.svn.wordpress.org/trunk@8596 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/update-core.php | 128 +++++++++++++++++++++++++++++- 1 file changed, 127 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/update-core.php b/wp-admin/includes/update-core.php index 60b0b8862e..868adc4900 100644 --- a/wp-admin/includes/update-core.php +++ b/wp-admin/includes/update-core.php @@ -1,7 +1,125 @@ delete($maintenance_file); + // Remove old files + foreach ( $_old_files as $old_file ) { + $old_file = $to . $old_file; + if ( !file_exists($old_file) ) + continue; + $wp_filesystem->delete($old_file, true); + } + // Force refresh of update information delete_option('update_core'); }