WordPress.org

Make WordPress Core

Changeset 45557


Ignore:
Timestamp:
06/20/2019 02:14:59 PM (3 months ago)
Author:
adamsilverstein
Message:

Themes: improve search by trimming search string.

Fix an issue where searching installed themes for an empty string resulted in matching all themes.

Props afercia, desrosj, hesyifei, evalarumbe.
Fixes #39041.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/theme.js

    r43577 r45557  
    180180        // Start with a full collection
    181181        this.reset( themes.data.themes, { silent: true } );
     182
     183        // Trim the term
     184        term = term.trim();
    182185
    183186        // Escape the term string for RegExp meta characters
Note: See TracChangeset for help on using the changeset viewer.