There is no way to edit an attachment
|Reported by:||mdawaffe||Owned by:||anonymous|
Currently, you can only edit an attachment via the Write Post page. This patch adds a means to "Edit Media" under the Manage section.
A new file, wp-admin/media.php is added as our media object jumping off point like post.php, comment.php, etc. Eventually, it'd be nice if all the delete, upload, edit, etc. links pointed to this file which then dispatched to the correct functions/templates.
We can move this functionality to upload.php if people want. The idea here was to be parallel with the rest of our "noun" files. ("medium.php" sounded dumb. We could do "attachment.php".)
get_media_item() is used to output the edit form, but the HTML/CSS has been tweaked to be a bit more flexible and a bit less table-centric (with negligible changes to the visual output for the iframed content on the Write page).
The basic JS form validation that wp-lists uses has been better abstracted and can now be used on any page.
get_edit_post_link() and friends point to the correct edit form for pages, posts, attachments.
Aditionally, the patch removes some debug code in script-loader.php (mt_rand() calls).
Tested on FF2 only.