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

On my custom tab, I copied media-form from media_upload_gallery_form, only changed form id and action-url to reflect my tab's name. The form displayed as expected, but after click "Save All Changes", the post data is not saved. Please note unlike custom fields that we add filter to "attachment_field_save", this time it is the entire media-form. It can be saved on either Gallery tab or Library tab, so I guess there has to be a way to be saved on my custom tab?

share|improve this question
@toscho ,Could you please check this question? – Jenny Jun 28 '12 at 12:38
up vote 0 down vote accepted

Just figured out this one-- in the function that load the iframe, add this:

if ( !empty($_POST) ) {
    $return = media_upload_form_handler();

    if ( is_string($return) )
        return $return;
    if ( is_array($return) )
        $errors = $return;

Then, all the form data get saved as normal.

share|improve this answer

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.