bp_blogs_remove_data_for_blog( int $blog_id )

Remove the all data related to a given blog from the BP blogs tracker and activity feed.

Description

Parameters

$blog_id

(int) (Required) The ID of the blog to expunge.

Source

File: bp-blogs/bp-blogs-functions.php

function bp_blogs_remove_data_for_blog( $blog_id ) {

	/**
	 * Fires before all data related to a given blog is removed from blogs tracker
	 * and activity feed.
	 *
	 * @since BuddyPress 1.5.0
	 *
	 * @param int $blog_id ID of the blog whose data is being removed.
	 */
	do_action( 'bp_blogs_before_remove_data_for_blog', $blog_id );

	// If this is regular blog, delete all data for that blog.
	BP_Blogs_Blog::delete_blog_for_all( $blog_id );

	/**
	 * Fires after all data related to a given blog has been removed from blogs tracker
	 * and activity feed.
	 *
	 * @since BuddyPress 1.0.0
	 *
	 * @param int $blog_id ID of the blog whose data is being removed.
	 */
	do_action( 'bp_blogs_remove_data_for_blog', $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.