add_filter( 'upgrader_clear_destination', array
( $this, 'delete_old_plugin'
), 10, 4
);
$this->skin->
header();
// Connect to the filesystem first.
$res =
$this->
fs_connect( array
( WP_CONTENT_DIR, WP_PLUGIN_DIR
) );
if ( !
$res ) { $this->skin->
footer();
return false;
} $this->skin->
bulk_header();
/*
* Only start maintenance mode if:
* - running Multisite and there are one or more plugins specified, OR
* - a plugin with an update available is currently active.
* @todo For multisite, maintenance mode should only kick in for individual sites if at all possible.
*/
$maintenance =
( is_multisite() && !
empty( $plugins ) );
foreach ( $plugins as $plugin ) { $maintenance =
$maintenance || ( is_plugin_active( $plugin ) &&
isset( $current->response
[ $plugin ] ) );
}