wphooks.info - wp_uninitialize_site

wp_uninitialize_site

(trunk - 5.1-alpha-44286)

*** New in trunk ***

The hook occurs in the following file:

wp-includes/ms-blogs.php:
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
	 */
	do_action_deprecated( 'delete_blog', array( $old_site->id, true ), '5.0.0' );

	/**
	 * Fires when a site's uninitialization routine should be executed.
	 *
	 * @since 5.0.0
	 *
	 * @param WP_Site $old_site Deleted site object.
	 */
	do_action( 'wp_uninitialize_site', $old_site );

	if ( is_site_meta_supported() ) {
		$blog_meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->blogmeta WHERE blog_id = %d ", $old_site->id ) );
		foreach ( $blog_meta_ids as $mid ) {
			delete_metadata_by_mid( 'blog', $mid );
		}
	}

	if ( false === $wpdb->delete( $wpdb->blogs, array( 'blog_id' => $old_site->id ) ) ) {