Changeset 31240
- Timestamp:
- 01/18/2015 08:39:39 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/theme.js
r30508 r31240 166 166 // @uses RegExp 167 167 search: function( term ) { 168 var match, results, haystack ;168 var match, results, haystack, name, description, author; 169 169 170 170 // Start with a full collection … … 182 182 // _.filter and .test 183 183 results = this.filter( function( data ) { 184 haystack = _.union( data.get( 'name' ), data.get( 'id' ), data.get( 'description' ), data.get( 'author' ), data.get( 'tags' ) ); 184 name = data.get( 'name' ).replace( /(<([^>]+)>)/ig, '' ); 185 description = data.get( 'description' ).replace( /(<([^>]+)>)/ig, '' ); 186 author = data.get( 'author' ).replace( /(<([^>]+)>)/ig, '' ); 187 188 haystack = _.union( name, data.get( 'id' ), description, author, data.get( 'tags' ) ); 185 189 186 190 if ( match.test( data.get( 'author' ) ) && term.length > 2 ) {
Note: See TracChangeset
for help on using the changeset viewer.