diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js index 1cf25bee25..7dc6589ecc 100644 --- a/wp-includes/js/media-views.js +++ b/wp-includes/js/media-views.js @@ -1116,7 +1116,7 @@ }; }, this ); - this.menu.view().add( views ); + this.menu.view().set( views ); }, hijackThickbox: function() { @@ -1439,7 +1439,7 @@ mainMenu: function() { media.view.MediaFrame.Select.prototype.mainMenu.call( this, { silent: true }); - this.menu.view().add({ + this.menu.view().set({ separateLibrary: new media.View({ className: 'separator', priority: 60 @@ -1538,7 +1538,7 @@ library.gallery = library.gallery || new Backbone.Model(); - this.sidebar.view().add({ + this.sidebar.view().set({ gallery: new media.view.Settings.Gallery({ controller: this, model: library.gallery, @@ -1560,7 +1560,7 @@ link: getUserSetting( 'urlbutton', 'post' ) }); - this.sidebar.view().add({ + this.sidebar.view().set({ display: new media.view.Settings.AttachmentDisplay({ controller: this, model: display[ single.cid ], @@ -2181,7 +2181,7 @@ this.controller = this.options.controller; this._views = {}; - this.add( _.extend( {}, this._views, this.options.views ), { silent: true }); + this.set( _.extend( {}, this._views, this.options.views ), { silent: true }); delete this.options.views; if ( ! this.options.silent ) @@ -2209,13 +2209,13 @@ return this; }, - add: function( id, view, options ) { + set: function( id, view, options ) { options = options || {}; // Accept an object with an `id` : `view` mapping. if ( _.isObject( id ) ) { _.each( id, function( view, id ) { - this.add( id, view, { silent: true }); + this.set( id, view, { silent: true }); }, this ); if ( ! options.silent ) @@ -2238,7 +2238,7 @@ return this._views[ id ]; }, - remove: function( id, options ) { + unset: function( id, options ) { delete this._views[ id ]; if ( ! options || ! options.silent ) this.render();