: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Returns the value of the key.
* Sets the value of a key.
* Sets values for a map of data.
param: function( key, value ) {
if ( arguments.length === 1 && typeof key === 'string' ) {
return this.uploader.settings.multipart_params[ key ];
if ( arguments.length > 1 ) {
this.uploader.settings.multipart_params[ key ] = value;
$.extend( this.uploader.settings.multipart_params, key );
* Make a few internal event callbacks available on the wp.Uploader object
* to change the Uploader internals if absolutely necessary.
var node, attached, container, id;
// Check if the browser node is in the DOM.
if ( node === document.body ) {
* If the browser node is not attached to the DOM,
* use a temporary container to house it, as the browser button shims
* require the button to exist in the DOM at all times.
id = 'wp-uploader-browser-' + this.uploader.id;
container = $( '#' + id );
if ( ! container.length ) {
container = $('<div class="wp-uploader-browser" />').css({
}).attr( 'id', 'wp-uploader-browser-' + this.uploader.id ).appendTo('body');
container.append( this.browser );
// Create a collection of attachments in the upload queue,
// so that other modules can track and display upload progress.
Uploader.queue = new wp.media.model.Attachments( [], { query: false });
// Create a collection to collect errors incurred while attempting upload.
Uploader.errors = new Backbone.Collection();
exports.Uploader = Uploader;