wp_uninitialize_site action-hookWP 5.1.0

Fires when a site's uninitialization routine should be executed.

Usage

add_action( 'wp_uninitialize_site', 'wp_kama_uninitialize_site_action' );

/**
 * Function for `wp_uninitialize_site` action-hook.
 * 
 * @param WP_Site $old_site Deleted site object.
 *
 * @return void
 */
function wp_kama_uninitialize_site_action( $old_site ){

	// action...
}
$old_site(WP_Site)
Deleted site object.

Changelog

Since 5.1.0 Introduced.

Where the hook is called

wp_delete_site()
wp_uninitialize_site
wp-includes/ms-site.php 261
do_action( 'wp_uninitialize_site', $old_site );

Where the hook is used in WordPress

wp-includes/ms-default-filters.php 54
add_action( 'wp_uninitialize_site', 'wp_uninitialize_site', 10, 1 );