Make WordPress Core

Changeset 27506


Ignore:
Timestamp:
03/11/2014 10:13:05 PM (11 years ago)
Author:
johnbillion
Message:

Present a normal admin page when bailing out of the Plugin Editor screen. Fixes #27067. Props SergeyBiryukov.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/plugin-editor.php

    r27469 r27506  
    2525$plugins = get_plugins();
    2626
    27 if ( empty($plugins) )
    28     wp_die( __('There are no plugins installed on this site.') );
     27if ( empty( $plugins ) ) {
     28    include( ABSPATH . 'wp-admin/admin-header.php' );
     29    ?>
     30    <div class="wrap">
     31        <h2><?php echo esc_html( $title ); ?></h2>
     32        <div id="message" class="error"><p><?php _e( 'You do not appear to have any plugins available at this time.' ); ?></p></div>
     33    </div>
     34    <?php
     35    include( ABSPATH . 'wp-admin/admin-footer.php' );
     36    exit;
     37}
    2938
    3039if ( $file ) {
Note: See TracChangeset for help on using the changeset viewer.