Ticket #6181 (closed defect: fixed)

Opened 9 months ago

Last modified 9 months ago

There is no way to edit an attachment

Reported by: mdawaffe Assigned to: anonymous
Priority: normal Milestone: 2.5
Component: General Version: 2.5
Severity: normal Keywords: has-patch needs-testing
Cc: andy

Description

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.

Attachments

6181.diff (24.5 kB) - added by mdawaffe on 03/12/08 05:01:12.

Change History

03/12/08 05:01:12 changed by mdawaffe

  • attachment 6181.diff added.

03/12/08 05:50:08 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [7262]) Attachment editing from mdawaffe. fixes #6181

03/12/08 05:50:28 changed by ryan

Worked well for me with FF and Safari.