From ef621a3c8bbe6e859583a0c37ad85ad35f11343f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 20 Nov 2013 23:07:10 +0000 Subject: [PATCH] Fix JSHint errors in media-models.js. props kadamwhite. fixes #26132. Built from https://develop.svn.wordpress.org/trunk@26295 git-svn-id: http://core.svn.wordpress.org/trunk@26200 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/media-models.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/wp-includes/js/media-models.js b/wp-includes/js/media-models.js index 78489d0797..ab26599aa1 100644 --- a/wp-includes/js/media-models.js +++ b/wp-includes/js/media-models.js @@ -1,3 +1,4 @@ +/* global _wpMediaModelsL10n:false */ window.wp = window.wp || {}; (function($){ @@ -151,12 +152,12 @@ window.wp = window.wp || {}; * ======================================================================== */ - /** - * wp.media.attachment - */ - media.attachment = function( id ) { + /** + * wp.media.attachment + */ + media.attachment = function( id ) { return Attachment.get( id ); - }; + }; /** * wp.media.model.Attachment @@ -233,7 +234,7 @@ window.wp = window.wp || {}; } }, - parse: function( resp, xhr ) { + parse: function( resp ) { if ( ! resp ) return resp; @@ -296,7 +297,7 @@ window.wp = window.wp || {}; }, // Automatically sort the collection when the order changes. - _changeOrder: function( model, order ) { + _changeOrder: function() { if ( this.comparator ) this.sort(); }, @@ -324,7 +325,7 @@ window.wp = window.wp || {}; } }, - _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') ) @@ -365,7 +366,7 @@ window.wp = window.wp || {}; 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 ); },