BP_Blogs_Blog::delete_blog_for_all( int $blog_id )

Delete the record of a given blog for all users.

Description

Parameters

$blog_id

(int) (Required) The blog being removed from all users.

Return

(int|bool) Number of rows deleted on success, false on failure.

Source

File: bp-blogs/classes/class-bp-blogs-blog.php

	public static function delete_blog_for_all( $blog_id ) {
		global $wpdb;

		bp_blogs_delete_blogmeta( $blog_id );

		$bp = buddypress();

		return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->blogs->table_name} WHERE blog_id = %d", $blog_id ) );
	}

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.