Make WordPress Core

Opened 22 months ago

Last modified 19 months ago

#38026 new enhancement

Add Delete link to details modal when file in trash

Reported by: mahu2401 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.0
Component: Media Keywords: has-patch
Focuses: ui Cc:


First enable media trash by adding define('MEDIA_TRASH', true); to wp-config.php and move a media file to trash by clicking its "Trash" Link either in grid view or list view.

Then navigate to the trash view. In list view there are two links on each item ("Restore" and "Delete Permanently").

In the details modal of the grid view there's only one link ("Untrash"). In addition this link is red like a delete link, but it actually restores the file. To delete the file you have to close the modal, select it with bulk select and then click the delete button in the toolbar.

I think there should be a second link "Delete Permanently" in the details modal and the "Untrash" link should be blue to avoid confusion.

Attachments (3)

untrash-delete-list.png (24.6 KB) - added by mahu2401 22 months ago.
Untrash and Delete in list view
untrash-grid.png (16.2 KB) - added by mahu2401 22 months ago.
Only Untrash in details modal
38026.patch (2.5 KB) - added by mahu2401 22 months ago.

Download all attachments as: .zip

Change History (6)

22 months ago

Untrash and Delete in list view

22 months ago

Only Untrash in details modal

22 months ago

#1 @mahu2401
22 months ago

  • Focuses administration added
  • Keywords has-patch added

I've added a first patch.

This ticket was mentioned in Slack in #core by helen. View the logs.

19 months ago

#3 @helen
19 months ago

  • Focuses ui added; administration removed
  • Type changed from defect (bug) to enhancement
  • Version changed from trunk to 4.0

Not sure how much work we want to do around media trash since it's not a true trash (the file is still accessible) and not very well-supported in general, but if somebody wants to take a look at aligning the two views that seems fine.

Note: See TracTickets for help on using tickets.