if ( $att->post_status == 'trash' ) wp_die( __('You can’t edit this attachment because it is in the Trash. Please move it out of the Trash and try again.') );
add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
if ( $att->post_status == 'trash' ) wp_die( __('You can’t edit this attachment because it is in the Trash. Please move it out of the Trash and try again.') );
add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);