0

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?

1
  • @toscho ,Could you please check this question? – Jenny Jun 28 '12 at 12:38
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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