I want to save a meta data to post parent when the media-form on gallery tab is saved( The submission button is “Save All Changes”). Which action hook can I use?
Leave a Reply
You must be logged in to post a comment.
I want to save a meta data to post parent when the media-form on gallery tab is saved( The submission button is “Save All Changes”). Which action hook can I use?
You must be logged in to post a comment.
For updates it is
'edit_attachment'
and for new attachments'add_attachment'
.There is no action dedicated to images coming from the gallery tab, but you could check the global array
$_FILES
. If there is a$_FILES['async-upload']
it is probably a request from the media popup.