From 1d2e3903b2f2f19ef20c5fb5e54072d0a973a842 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 22 Feb 2007 01:52:00 +0000 Subject: [PATCH] Fix wp_delete_file action. Props filosofo. fixes #3655 git-svn-id: https://develop.svn.wordpress.org/trunk@4910 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/custom-header.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index 8b0ad34fd6..4db9f71d85 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -286,8 +286,7 @@ Event.observe( window, 'load', hide_text ); // cleanup $file = get_attached_file( $_POST['attachment_id'] ); $medium = str_replace(basename($file), 'midsize-'.basename($file), $file); - @unlink( $medium ); - apply_filters( 'wp_delete_file', $medium ); + @unlink( apply_filters( 'wp_delete_file', $medium ) ); wp_delete_attachment( $_POST['attachment_id'] ); return $this->finished();