if ( !
is_multisite() ) { wp_die( __( 'Multisite support is not enabled.'
) );
}if ( !
current_user_can( 'delete_site'
) ) { wp_die( __( 'Sorry, you are not allowed to delete this site.'
) );
}if ( isset( $_GET['h'
] ) && '' !==
$_GET['h'
] && false !==
get_option( 'delete_blog_hash'
) ) { if ( hash_equals( get_option( 'delete_blog_hash'
),
$_GET['h'
] ) ) { wpmu_delete_blog( get_current_blog_id() );
wp_die( sprintf( /* translators: %s: Network title. */
__( 'Thank you for using %s, your site has been deleted. Happy trails to you until we meet again.'
),
get_network()->site_name
) );
} else { wp_die( __( 'Sorry, the link you clicked is stale. Please select another option.'
) );
}}