From 54edf92498d04fb40661421708b95b5e27d152b6 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Thu, 30 Mar 2017 04:30:27 +0000 Subject: [PATCH] Multisite: Add `deleted_blog` action after site has been deleted. Props pauldewouters, johnjamesjacoby. Fixes #25584. git-svn-id: https://develop.svn.wordpress.org/trunk@40351 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/ms.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/wp-admin/includes/ms.php b/src/wp-admin/includes/ms.php index 254af7f16f..6a4ca9d380 100644 --- a/src/wp-admin/includes/ms.php +++ b/src/wp-admin/includes/ms.php @@ -173,6 +173,16 @@ function wpmu_delete_blog( $blog_id, $drop = false ) { clean_blog_cache( $blog ); } + /** + * Fires after the site is deleted from the network. + * + * @since 4.8.0 + * + * @param int $blog_id The site ID. + * @param bool $drop True if site's tables should be dropped. Default is false. + */ + do_action( 'deleted_blog', $blog_id, $drop ); + if ( $switch ) restore_current_blog(); }