Delete instead of trash when bulk deleting media. Props nacin. fixes #11455

git-svn-id: http://svn.automattic.com/wordpress/trunk@12415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-12-16 17:14:21 +00:00
parent b82594d1cd
commit 20162ec029
1 changed files with 1 additions and 1 deletions

View File

@ -2839,7 +2839,7 @@ function wp_delete_attachment( $post_id, $force_delete = false ) {
if ( 'attachment' != $post->post_type )
return false;
if ( !$force_delete && 'trash' != $post->post_status )
if ( !$force_delete && EMPTY_TRASH_DAYS && MEDIA_TRASH && 'trash' != $post->post_status )
return wp_trash_post( $post_id );
delete_post_meta($post_id, '_wp_trash_meta_status');