Delete instead of trash when bulk deleting media. Props nacin. fixes #11455
git-svn-id: https://develop.svn.wordpress.org/trunk@12415 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3b656ce72e
commit
83fb251dc3
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user