Media JS: Use correct reference to search term in the Attachments model search filter. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22013 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0dd940e0c1
commit
af4607a11e
@ -373,12 +373,12 @@ if ( typeof wp === 'undefined' )
|
||||
// Note that this client-side searching is *not* equivalent
|
||||
// to our server-side searching.
|
||||
search: function( attachment ) {
|
||||
if ( ! this.searching )
|
||||
if ( ! this.props.get('search') )
|
||||
return true;
|
||||
|
||||
return _.any(['title','filename','description','caption','name'], function( key ) {
|
||||
var value = attachment.get( key );
|
||||
return value && -1 !== value.search( this.searching );
|
||||
return value && -1 !== value.search( this.props.get('search') );
|
||||
}, this );
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user