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

git-svn-id: https://develop.svn.wordpress.org/trunk@27506 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2014-03-11 22:13:05 +00:00
parent b7fbb777e9
commit 961899214e
1 changed files with 11 additions and 2 deletions

View File

@ -24,8 +24,17 @@ wp_reset_vars( array( 'action', 'error', 'file', 'plugin' ) );
$plugins = get_plugins();
if ( empty($plugins) )
wp_die( __('There are no plugins installed on this site.') );
if ( empty( $plugins ) ) {
include( ABSPATH . 'wp-admin/admin-header.php' );
?>
<div class="wrap">
<h2><?php echo esc_html( $title ); ?></h2>
<div id="message" class="error"><p><?php _e( 'You do not appear to have any plugins available at this time.' ); ?></p></div>
</div>
<?php
include( ABSPATH . 'wp-admin/admin-footer.php' );
exit;
}
if ( $file ) {
$plugin = $file;