Make WordPress Core

Ticket #26132: 26132.diff

File 26132.diff, 1.6 KB (added by kadamwhite, 11 years ago)
  • src/wp-includes/js/media-models.js

     
     1/* global _wpMediaModelsL10n:false */
    12window.wp = window.wp || {};
    23
    34(function($){
     
    151152         * ========================================================================
    152153         */
    153154
    154          /**
    155           * wp.media.attachment
    156           */
    157          media.attachment = function( id ) {
     155        /**
     156         * wp.media.attachment
     157         */
     158        media.attachment = function( id ) {
    158159                return Attachment.get( id );
    159          };
     160        };
    160161
    161162        /**
    162163         * wp.media.model.Attachment
     
    233234                        }
    234235                },
    235236
    236                 parse: function( resp, xhr ) {
     237                parse: function( resp ) {
    237238                        if ( ! resp )
    238239                                return resp;
    239240
     
    296297                },
    297298
    298299                // Automatically sort the collection when the order changes.
    299                 _changeOrder: function( model, order ) {
     300                _changeOrder: function() {
    300301                        if ( this.comparator )
    301302                                this.sort();
    302303                },
     
    324325                        }
    325326                },
    326327
    327                 _changeFilteredProps: function( model, options ) {
     328                _changeFilteredProps: function( model ) {
    328329                        // If this is a query, updating the collection will be handled by
    329330                        // `this._requery()`.
    330331                        if ( this.props.get('query') )
     
    365366                validator: function( attachment ) {
    366367                        if ( ! this.validateDestroyed && attachment.destroyed )
    367368                                return false;
    368                         return _.all( this.filters, function( filter, key ) {
     369                        return _.all( this.filters, function( filter ) {
    369370                                return !! filter.call( this, attachment );
    370371                        }, this );
    371372                },