Media: Allow multi-uploads in Galleries.

Previously, when more than one media item was uploaded using a gallery, failures occurred on the second upload.

Props glendaviesnz, Mista-Flo, hellofromTonya.
Fixes #53169.


Built from https://develop.svn.wordpress.org/trunk@51123


git-svn-id: http://core.svn.wordpress.org/trunk@50732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
antpb 2021-06-08 23:14:55 +00:00
parent cc26b6f068
commit 38e4f333c0
3 changed files with 7 additions and 5 deletions

View File

@ -5648,9 +5648,11 @@ UploaderStatus = View.extend(/** @lends wp.media.view.UploaderStatus.prototype *
return attachment.get('uploading');
});
this.$index.text( index + 1 );
this.$total.text( queue.length );
this.$filename.html( active ? this.filename( active.get('filename') ) : '' );
if ( this.$index && this.$total && this.$filename ) {
this.$index.text( index + 1 );
this.$total.text( queue.length );
this.$filename.html( active ? this.filename( active.get('filename') ) : '' );
}
},
/**
* @param {string} filename

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-alpha-51122';
$wp_version = '5.8-alpha-51123';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.