Make WordPress Core

Opened 3 months ago

Last modified 5 days ago

#57893 new enhancement

Remove the redundancy of adding row actions in `class-wp-media-list-table.php`

Reported by: kebbet's profile kebbet Owned by:
Milestone: 6.3 Priority: normal
Severity: normal Version: 3.1
Component: Media Keywords: has-patch needs-testing has-testing-info
Focuses: ui Cc:


This is a ticket related to #57890 which dealt with issues of row actions not displayed while a user has filtered the media library list.

The reason is _get_row_actions which duplicates code for multiple row actions in the if ( $this->detached ) and else logic.

The goal of this ticket is to remove the redundancy in that function to avoid furter issues like the ones in #57890.

Props to @pbiron for suggesting creation of this ticket.

Version set to 3.1, introduced in [16229].

Change History (9)

#1 @kebbet
3 months ago

  • Type changed from defect (bug) to enhancement

#2 @SergeyBiryukov
3 months ago

  • Milestone changed from Awaiting Review to 6.3

#3 @ignatggeorgiev
7 weeks ago

Last edited 7 weeks ago by ignatggeorgiev (previous) (diff)

This ticket was mentioned in PR #4364 on WordPress/wordpress-develop by @kebbet.

6 weeks ago

  • Keywords has-patch added; needs-patch removed

#5 @kebbet
6 weeks ago

  • Keywords needs-patch added; has-patch removed

My attached PR (#PR 4364) also adresses #57890. So there is a bit of a overlap.

#6 @kebbet
6 weeks ago

  • Keywords has-patch needs-testing has-testing-info added; needs-patch removed

PR ready for review, if you have the time @SergeyBiryukov @pbiron

To test:

  • test all filters in the media list view
  • test setting and unsetting media constants EMPTY_TRASH_DAYS and MEDIA_TRASH
  • make sure all row actions actually perform their action
  • extra: make sure media_row_actions works as expected.

What has changed from current implementation in trunk

  • Download is shown in all filter views (even trash)
  • Copy is shown in all views except trash

This ticket was mentioned in Slack in #core-media by antpb. View the logs.

5 weeks ago

#8 @kebbet
5 weeks ago

If this ticket gets merged into core before #57890, then that ticket can be closed.

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

5 days ago

Note: See TracTickets for help on using tickets.