From d6fa3df42031c493ce6c4b4ff5f32be1745067d1 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 12 Nov 2020 22:03:36 +0000 Subject: [PATCH] Customize: Exclude widget ID attributes from search. Having search terms match the ID attributes leads to confusing results, specifically when the admin interface is set to a language other than English. Follow-up to [27650]. Props afercia, dlh, noisysocks. Fixes #46456. git-svn-id: https://develop.svn.wordpress.org/trunk@49586 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/wp/customize/widgets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/_enqueues/wp/customize/widgets.js b/src/js/_enqueues/wp/customize/widgets.js index 990a3e19b5..8d320c8c86 100644 --- a/src/js/_enqueues/wp/customize/widgets.js +++ b/src/js/_enqueues/wp/customize/widgets.js @@ -98,7 +98,7 @@ match = new RegExp( '^(?=.*' + term + ').+', 'i' ); this.each( function ( data ) { - haystack = [ data.get( 'name' ), data.get( 'id' ), data.get( 'description' ) ].join( ' ' ); + haystack = [ data.get( 'name' ), data.get( 'description' ) ].join( ' ' ); data.set( 'search_matched', match.test( haystack ) ); } ); }