From a316ece6ab8d7551ddda4a3ceab4b6e67b3a5408 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 22 Feb 2007 01:52:00 +0000 Subject: [PATCH] Fix wp_delete_file action. Props filosofo. fixes #3655 git-svn-id: http://svn.automattic.com/wordpress/trunk@4910 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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();