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. git-svn-id: https://develop.svn.wordpress.org/trunk@28890 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
665e2c3ce0
commit
08969ece9e
@ -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 );
|
||||
},
|
||||
|
||||
|
@ -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
Block a user