Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#22047 closed enhancement (duplicate)

Do action 'save_post' for attachments in 'wp_insert_attachment()'

Reported by: dnaber-de Owned by:
Priority: normal Milestone:
Component: Media Version: 3.5
Severity: normal Keywords: has-patch
Cc: Focuses:

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)

22407.patch (1.5 KB ) - added by c3mdigital 14 years ago.
adds save_post and edit_post actions to wp_insert_attachment

Download all attachments as: .zip

Change History (5)

#1 @DrewAPicture
14 years ago

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

#2 @ocean90
14 years ago

  • Component GeneralMedia
  • Keywords needs-patch added; dev-feedback 2nd-opinion removed
  • Milestone Awaiting Review3.5

@c3mdigital
14 years ago

adds save_post and edit_post actions to wp_insert_attachment

#3 @c3mdigital
14 years ago

  • Keywords has-patch added; needs-patch removed

#4 @nacin
14 years ago

  • Milestone 3.5
  • Resolutionduplicate
  • Status newclosed
Note: See TracTickets for help on using tickets.