WordPress.org

Make WordPress Core

Changeset 20753


Ignore:
Timestamp:
05/09/12 16:16:03 (3 years ago)
Author:
ryan
Message:

Restrict the media editor to posts with the attachment post type. Props helenyhou. fixes #20625

File:
1 edited

Legend:

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

    r20449 r20753  
    6060 
    6161    if ( empty($att->ID) ) wp_die( __('You attempted to edit an attachment that doesn’t exist. Perhaps it was deleted?') ); 
     62    if ( 'attachment' !== $att->post_type ) wp_die( __('You attempted to edit an item that isn’t an attachment. Please go back and try again.') ); 
    6263    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.') ); 
    6364 
Note: See TracChangeset for help on using the changeset viewer.