Show a "No themes found" message if the search for an installed theme doesn't produce any results.
props gauravmittal1995 for initial patch. fixes #28587. Built from https://develop.svn.wordpress.org/trunk@28890 git-svn-id: http://core.svn.wordpress.org/trunk@28689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
341eca6024
commit
ff00c377ec
|
@ -190,6 +190,12 @@ themes.Collection = Backbone.Collection.extend({
|
|||
return match.test( haystack );
|
||||
});
|
||||
|
||||
if ( results.length === 0 ) {
|
||||
this.trigger( 'query:empty' );
|
||||
} else {
|
||||
$( 'body' ).removeClass( 'no-results' );
|
||||
}
|
||||
|
||||
this.reset( results );
|
||||
},
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -233,6 +233,8 @@ foreach ( $themes as $theme ) :
|
|||
</div>
|
||||
<div class="theme-overlay"></div>
|
||||
|
||||
<p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p>
|
||||
|
||||
<?php
|
||||
// List broken themes, if any.
|
||||
if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_get_themes( array( 'errors' => true ) ) ) {
|
||||
|
|
Loading…
Reference in New Issue