Opened 8 months ago
Closed 8 months ago
#22047 closed enhancement (duplicate)
Do action 'save_post' for attachments in 'wp_insert_attachment()'
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Media | Version: | 3.5 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | dnaber-de |
Description
I'm currently change my plugins to use meta boxes instead of the filter 'attachment_fields_to_edit' to add fields to the attachment edit screen. Adding meta boxes works as expected like for all other post types.
They usual way to evaluate meta boxes is a callback on 'save_post' for all other post-types. At the moment there are two actions for the attachment post type: 'add_attachment' and 'edit_attachment'. I think it would be consistent to do the action 'save_post' also in 'wp_insert_attachment()'. Or at least provide an action like 'save_attachment'.
Attachments (1)
Change History (5)
comment:1
DrewAPicture — 8 months ago
- Component changed from General to Media
- Keywords needs-patch added; dev-feedback 2nd-opinion removed
- Milestone changed from Awaiting Review to 3.5
comment:3
c3mdigital — 8 months ago
- Keywords has-patch added; needs-patch removed
Note: See
TracTickets for help on using
tickets.

Related: #21391 - Move attachment editing (media.php) to use standard post type UI