wp_uninitialize_site

wp_uninitialize_site

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7

do_action('wp_uninitialize_site') is found 1 times:

  • /wp-includes/ms-site.php line 261
    	 * @since 5.1.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 );
    		}
    

See this hook used in plugins: