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

View File

@ -24,8 +24,17 @@ wp_reset_vars( array( 'action', 'error', 'file', 'plugin' ) );
$plugins = get_plugins(); $plugins = get_plugins();
if ( empty($plugins) ) if ( empty( $plugins ) ) {
wp_die( __('There are no plugins installed on this site.') ); 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 ) { if ( $file ) {
$plugin = $file; $plugin = $file;