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

Built from https://develop.svn.wordpress.org/trunk@27506


git-svn-id: http://core.svn.wordpress.org/trunk@27349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2014-03-11 22:14:14 +00:00
parent 099447fba5
commit f0f492a030
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;