+/* global _wpMediaModelsL10n:false */
window.wp = window.wp || {};
(function($){
* ========================================================================
*/
- /**
- * wp.media.attachment
- */
- media.attachment = function( id ) {
+ /**
+ * wp.media.attachment
+ */
+ media.attachment = function( id ) {
return Attachment.get( id );
- };
+ };
/**
* wp.media.model.Attachment
}
},
- parse: function( resp, xhr ) {
+ parse: function( resp ) {
if ( ! resp )
return resp;
},
// Automatically sort the collection when the order changes.
- _changeOrder: function( model, order ) {
+ _changeOrder: function() {
if ( this.comparator )
this.sort();
},
}
},
- _changeFilteredProps: function( model, options ) {
+ _changeFilteredProps: function( model ) {
// If this is a query, updating the collection will be handled by
// `this._requery()`.
if ( this.props.get('query') )
validator: function( attachment ) {
if ( ! this.validateDestroyed && attachment.destroyed )
return false;
- return _.all( this.filters, function( filter, key ) {
+ return _.all( this.filters, function( filter ) {
return !! filter.call( this, attachment );
}, this );
},