X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/11be8dc178e77d0b46189bbd8e33a216a9b90942..a01a150d87a096c70b6ec80332b7ce89c943eefe:/wp-admin/media.php?action=edit;attachment_id=%3C%3Fphp%20the_ID%28%29 diff --git a/wp-admin/media.php b/wp-admin/media.php index 906238f7..6715773b 100644 --- a/wp-admin/media.php +++ b/wp-admin/media.php @@ -7,7 +7,7 @@ */ /** Load WordPress Administration Bootstrap */ -require_once('admin.php'); +require_once('./admin.php'); $parent_file = 'upload.php'; $submenu_file = 'upload.php'; @@ -58,12 +58,16 @@ 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?') ); + 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); wp_enqueue_script( 'wp-ajax-response' ); -// wp_admin_css( 'media' ); + wp_enqueue_script('image-edit'); + wp_enqueue_style('imgareaselect'); - require( 'admin-header.php' ); + require( './admin-header.php' ); $parent_file = 'upload.php'; $message = ''; @@ -72,7 +76,7 @@ case 'edit' : switch ( $_GET['message'] ) : case 'updated' : $message = __('Media attachment updated.'); - $class = 'updated fade'; + $class = 'updated'; break; endswitch; } @@ -85,7 +89,11 @@ case 'edit' :

-
+ +

+ +

+
false, 'send' => false, 'delete' => false, 'show_title' => false, 'errors' => $errors ) ); ?> @@ -93,9 +101,9 @@ case 'edit' :

- - - + + + @@ -106,7 +114,7 @@ case 'edit' :