WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 6 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 needs-refresh
Focuses: ui Cc:
PR Number:

Description

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 3 years ago.
Untrash and Delete in list view
untrash-grid.png (16.2 KB) - added by mahu2401 3 years ago.
Only Untrash in details modal
38026.patch (2.5 KB) - added by mahu2401 3 years ago.

Download all attachments as: .zip

Change History (7)

@mahu2401
3 years ago

Untrash and Delete in list view

@mahu2401
3 years ago

Only Untrash in details modal

@mahu2401
3 years ago

#1 @mahu2401
3 years 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.


3 years ago

#3 @helen
3 years 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.

#4 @desrosj
6 months ago

  • Keywords needs-refresh added

@mahu2401 are you still interested in this? 38026.patch is failing to apply cleanly to trunk. It needs to be refreshed.

Note: See TracTickets for help on using tickets.