diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php index 815a30988a..237f3e62d7 100644 --- a/src/wp-admin/includes/media.php +++ b/src/wp-admin/includes/media.php @@ -805,7 +805,9 @@ function wp_media_upload_handler() { if ( isset( $_POST['save'] ) ) { $errors['upload_notice'] = __('Saved.'); - return media_upload_gallery(); + wp_enqueue_script( 'admin-gallery' ); + return wp_iframe( 'media_upload_gallery_form', $errors ); + } elseif ( ! empty( $_POST ) ) { $return = media_upload_form_handler();