Opened 7 hours ago
Last modified 7 hours ago
#65204 assigned defect (bug)
Custom Bulk Actions missing from Grid View
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | major | Version: | trunk |
| Component: | Media | Keywords: | has-patch |
| Focuses: | ui, javascript, administration | Cc: |
Description
The Media Library list view allows plugins to register custom bulk actions via the bulk_actions-upload and handle_bulk_actions-upload PHP filters. However, the grid view (wp-admin/upload.php?mode=grid) does not reflect those bulk actions. The toolbar in bulk select mode is hardcoded to only show the Delete button.
This means plugins which add bulk actions like the AI Experiments plugin's(e.g. "Generate Alt Text") to the Media page, will simply not show up on the grid view.
Attachments (2)
Change History (4)
This ticket was mentioned in PR #11765 on WordPress/wordpress-develop by @takshil.
7 hours ago
#2
- Keywords has-patch added
Plugins can add bulk actions to the Media Library list view via bulk_actions-upload and handle_bulk_actions-upload, but the grid view has no equivalent, its toolbar is hardcoded to only show Delete. This patch bridges the existing PHP filters into the grid view so plugins get both views for free with zero code changes.
Trac ticket: https://core.trac.wordpress.org/ticket/65204
| Before | After |
|---|
## Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Opus 4.6
Used for: Used for initial discovery of the issue and finding relevant pieces of code, discussing approach and implementing finer details. Last code was reviewed, iterated on, and validated by me.
Sample plugin to test this issue: