mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 15:31:42 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@45557 git-svn-id: http://core.svn.wordpress.org/trunk@45368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
89e7a75d96
commit
bcc4ecb1f6
@ -180,6 +180,9 @@ themes.Collection = Backbone.Collection.extend({
|
||||
// Start with a full collection
|
||||
this.reset( themes.data.themes, { silent: true } );
|
||||
|
||||
// Trim the term
|
||||
term = term.trim();
|
||||
|
||||
// Escape the term string for RegExp meta characters
|
||||
term = term.replace( /[-\/\\^$*+?.()|[\]{}]/g, '\\$&' );
|
||||
|
||||
|
2
wp-admin/js/theme.min.js
vendored
2
wp-admin/js/theme.min.js
vendored
File diff suppressed because one or more lines are too long
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.3-alpha-45556';
|
||||
$wp_version = '5.3-alpha-45557';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user