mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-09-15 21:40:26 +00:00
Plugins: Improve error messages on plugins screen.
This unifies the layout and wording of error messages on both the plugins screen and the themes screen. Props tinkerbelly, juhise, Ankit K Gupta, m1tk00, swissspidy, mrahmadawais, danieltj. Fixes #37430. git-svn-id: https://develop.svn.wordpress.org/trunk@41608 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -230,11 +230,10 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
||||
*/
|
||||
public function no_items() {
|
||||
if ( isset( $this->error ) ) {
|
||||
$message = $this->error->get_error_message() . '<p class="hide-if-no-js"><a href="#" class="button" onclick="document.location.reload(); return false;">' . __( 'Try again' ) . '</a></p>';
|
||||
echo '<div class="inline error"><p>' . $this->error->get_error_message() . '</p><p class="hide-if-no-js"><button class="button try-again">' . __( 'Try Again' ) . '</button></p></div>';
|
||||
} else {
|
||||
$message = __( 'No plugins match your request.' );
|
||||
echo '<div class="no-plugin-results">' . __( 'No plugins found. Try a different search query.' ) . '</div>';
|
||||
}
|
||||
echo '<div class="no-plugin-results">' . $message . '</div>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user