mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-14 22:56:19 +01:00
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:
parent
099447fba5
commit
f0f492a030
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user