Ticket #26132: 26132.diff
File 26132.diff, 1.6 KB (added by , 11 years ago) |
---|
-
src/wp-includes/js/media-models.js
1 /* global _wpMediaModelsL10n:false */ 1 2 window.wp = window.wp || {}; 2 3 3 4 (function($){ … … 151 152 * ======================================================================== 152 153 */ 153 154 154 155 156 157 155 /** 156 * wp.media.attachment 157 */ 158 media.attachment = function( id ) { 158 159 return Attachment.get( id ); 159 160 }; 160 161 161 162 /** 162 163 * wp.media.model.Attachment … … 233 234 } 234 235 }, 235 236 236 parse: function( resp , xhr) {237 parse: function( resp ) { 237 238 if ( ! resp ) 238 239 return resp; 239 240 … … 296 297 }, 297 298 298 299 // Automatically sort the collection when the order changes. 299 _changeOrder: function( model, order) {300 _changeOrder: function() { 300 301 if ( this.comparator ) 301 302 this.sort(); 302 303 }, … … 324 325 } 325 326 }, 326 327 327 _changeFilteredProps: function( model , options) {328 _changeFilteredProps: function( model ) { 328 329 // If this is a query, updating the collection will be handled by 329 330 // `this._requery()`. 330 331 if ( this.props.get('query') ) … … 365 366 validator: function( attachment ) { 366 367 if ( ! this.validateDestroyed && attachment.destroyed ) 367 368 return false; 368 return _.all( this.filters, function( filter , key) {369 return _.all( this.filters, function( filter ) { 369 370 return !! filter.call( this, attachment ); 370 371 }, this ); 371 372 },