Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 12 months ago

#6181 closed defect (bug) (fixed)

There is no way to edit an attachment

Reported by: mdawaffe's profile mdawaffe Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.5
Component: General Keywords: has-patch needs-testing
Focuses: Cc:

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 (1)

6181.diff (24.5 KB) - added by mdawaffe 16 years ago.

Download all attachments as: .zip

Change History (4)

@mdawaffe
16 years ago

#1 @ryan
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

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

#2 @ryan
16 years ago

Worked well for me with FF and Safari.

#3 @audrasjb
12 months ago

In 55647:

Media: Deprecate wp-admin/media.php.

The wp-admin/media.php file was introduced in [7262], then removed from the Media workflow in [21948].
This changeset finally deprecates it as it is not used anymore.

Follow-up to [7262], [21948].

Props kebbet, costdev, SergeyBiryukov, jrf, antpb, audrasjb.
Fixes #57612.
See #6181, #21391, #57608.

Note: See TracTickets for help on using tickets.