Make WordPress Core


Ignore:
Timestamp:
09/27/2017 08:45:46 AM (7 years ago)
Author:
swissspidy
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php

    r41290 r41608  
    231231    public function no_items() {
    232232        if ( isset( $this->error ) ) {
    233             $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>';
     233            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>';
    234234        } else {
    235             $message = __( 'No plugins match your request.' );
    236         }
    237         echo '<div class="no-plugin-results">' . $message . '</div>';
     235            echo '<div class="no-plugin-results">' . __( 'No plugins found. Try a different search query.' ) . '</div>';
     236        }
    238237    }
    239238
Note: See TracChangeset for help on using the changeset viewer.