]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/media.php
WordPress 3.4
[autoinstalls/wordpress.git] / wp-admin / media.php
index 1b750d585a7218919f16d8c1b10fbbfeb7d96400..15d4323876a0b351ca664591564b260d2220c828 100644 (file)
@@ -59,6 +59,7 @@ case 'edit' :
        $att = get_post($att_id);
 
        if ( empty($att->ID) ) wp_die( __('You attempted to edit an attachment that doesn’t exist. Perhaps it was deleted?') );
        $att = get_post($att_id);
 
        if ( empty($att->ID) ) wp_die( __('You attempted to edit an attachment that doesn’t exist. Perhaps it was deleted?') );
+       if ( 'attachment' !== $att->post_type ) wp_die( __('You attempted to edit an item that isn’t an attachment. Please go back and try again.') );
        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);
@@ -144,6 +145,3 @@ default:
        exit;
 
 endswitch;
        exit;
 
 endswitch;
-
-
-?>