Make WordPress Core

Changeset 28871


Ignore:
Timestamp:
06/27/2014 09:31:28 PM (12 years ago)
Author:
wonderboymusic
Message:

In deprecated media iframe code, attachment_fields_to_save filter should not be called twice after initial image upload in post.

Props SergeyBiryukov.
Fixes #20720.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/media.php

    r28847 r28871  
    774774        }
    775775
    776         if ( !empty($_POST) ) {
     776        if ( isset( $_POST['save'] ) ) {
     777                $errors['upload_notice'] = __('Saved.');
     778                return media_upload_gallery();
     779        } elseif ( ! empty( $_POST ) ) {
    777780                $return = media_upload_form_handler();
    778781
     
    781784                if ( is_array($return) )
    782785                        $errors = $return;
    783         }
    784 
    785         if ( isset($_POST['save']) ) {
    786                 $errors['upload_notice'] = __('Saved.');
    787                 return media_upload_gallery();
    788786        }
    789787
Note: See TracChangeset for help on using the changeset viewer.