WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 3 down vote accepted

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.

share|improve this answer
great! it saved! – Jenny Jun 8 '12 at 3:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.