mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Fix wp_delete_file action. Props filosofo. fixes #3655
git-svn-id: http://svn.automattic.com/wordpress/trunk@4910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fea2a6e503
commit
a316ece6ab
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user