From 33a187a61e91f46f05772a67b4a985b165790f62 Mon Sep 17 00:00:00 2001 From: ryan Date: Sat, 9 Aug 2008 01:00:27 +0000 Subject: [PATCH] Remove old files. see #5560 git-svn-id: http://svn.automattic.com/wordpress/trunk@8596 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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'); }