equal
deleted
inserted
replaced
56 if ( !current_user_can('edit_post', $att_id) ) |
56 if ( !current_user_can('edit_post', $att_id) ) |
57 wp_die ( __('You are not allowed to edit this attachment.') ); |
57 wp_die ( __('You are not allowed to edit this attachment.') ); |
58 |
58 |
59 $att = get_post($att_id); |
59 $att = get_post($att_id); |
60 |
60 |
|
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 |
61 add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2); |
64 add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2); |
62 |
65 |
63 wp_enqueue_script( 'wp-ajax-response' ); |
66 wp_enqueue_script( 'wp-ajax-response' ); |
|
67 wp_enqueue_script('image-edit'); |
|
68 wp_enqueue_style('imgareaselect'); |
64 |
69 |
65 require( 'admin-header.php' ); |
70 require( 'admin-header.php' ); |
66 |
71 |
67 $parent_file = 'upload.php'; |
72 $parent_file = 'upload.php'; |
68 $message = ''; |
73 $message = ''; |