diff -r 490d5cc509ed -r cf61fcea0001 wp/wp-includes/js/plupload/wp-plupload.js --- a/wp/wp-includes/js/plupload/wp-plupload.js Tue Jun 09 11:14:17 2015 +0000 +++ b/wp/wp-includes/js/plupload/wp-plupload.js Mon Oct 14 17:39:30 2019 +0200 @@ -14,7 +14,7 @@ * * The Plupload library provides cross-browser uploader UI integration. * This object bridges the Plupload API to integrate uploads into the - * WordPress back-end and the WordPress media experience. + * WordPress back end and the WordPress media experience. * * @param {object} options The options passed to the new plupload instance. * @param {object} options.container The id of uploader container. @@ -180,6 +180,11 @@ $(self).trigger( 'uploader:ready' ); }); + this.uploader.bind( 'postinit', function( up ) { + up.refresh(); + self.init(); + }); + this.uploader.init(); if ( this.browser ) { @@ -193,7 +198,6 @@ /** * After files were filtered and added to the queue, create a model for each. * - * @event FilesAdded * @param {plupload.Uploader} uploader Uploader instance. * @param {Array} files Array of file objects that were added to queue by the user. */ @@ -311,9 +315,6 @@ up.refresh(); }); - this.uploader.bind( 'PostInit', function() { - self.init(); - }); }; // Adds the 'defaults' and 'browser' properties. @@ -338,7 +339,7 @@ } }; - $.extend( Uploader.prototype, { + $.extend( Uploader.prototype, /** @lends wp.Uploader.prototype */{ /** * Acts as a shortcut to extending the uploader's multipart_params object. *