$current =
get_site_transient( 'update_themes'
);
add_filter( 'upgrader_pre_install', array
( $this, 'current_before'
), 10, 2
);
add_filter( 'upgrader_post_install', array
( $this, 'current_after'
), 10, 2
);
add_filter( 'upgrader_clear_destination', array
( $this, 'delete_old_theme'
), 10, 4
);
$this->skin->
header();
// Connect to the filesystem first.
$res =
$this->
fs_connect( array
( WP_CONTENT_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 themes specified, OR
* - a theme with an update available is currently in use.
* @todo For multisite, maintenance mode should only kick in for individual sites if at all possible.
*/