Make WordPress Core


Ignore:
Timestamp:
07/30/2009 01:39:34 PM (15 years ago)
Author:
azaozz
Message:

Trash status updates for posts, pages, comments and attachments, props caesarsgrunt, see #4529

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/media.php

    r11383 r11749  
    5959    $att = get_post($att_id);
    6060
     61    if ( empty($att->ID) ) wp_die( __('You attempted to edit an attachment that doesn’t exist. Perhaps it was deleted?') );
     62    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.') );
     63   
    6164    add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
    6265
Note: See TracChangeset for help on using the changeset viewer.