Make WordPress Core

Changeset 49586


Ignore:
Timestamp:
11/12/2020 10:03:36 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/customize/widgets.js

    r48650 r49586  
    9999
    100100            this.each( function ( data ) {
    101                 haystack = [ data.get( 'name' ), data.get( 'id' ), data.get( 'description' ) ].join( ' ' );
     101                haystack = [ data.get( 'name' ), data.get( 'description' ) ].join( ' ' );
    102102                data.set( 'search_matched', match.test( haystack ) );
    103103            } );
Note: See TracChangeset for help on using the changeset viewer.