From fa3dc867e7fdcdd930923162b1f5e592880920ed Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Thu, 30 Mar 2017 04:31:44 +0000 Subject: [PATCH] Multisite: Add `deleted_blog` action after site has been deleted. Props pauldewouters, johnjamesjacoby. Fixes #25584. Built from https://develop.svn.wordpress.org/trunk@40351 git-svn-id: http://core.svn.wordpress.org/trunk@40258 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/ms.php | 10 ++++++++++ wp-includes/version.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index 254af7f16f..6a4ca9d380 100644 --- a/wp-admin/includes/ms.php +++ b/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(); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 6c8ebbaf1a..59c6f96acb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-40350'; +$wp_version = '4.8-alpha-40351'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.