bp_blogs_remove_blog( int $blog_id )

Remove the “blog created” item from the BP blogs tracker and activity feed.

Description

Parameters

$blog_id

(int) (Required) ID of the blog being removed.

Source

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

function bp_blogs_remove_blog( $blog_id ) {

	$blog_id = (int) $blog_id;

	/**
	 * Fires before a "blog created" item is removed from blogs
	 * tracker and activity feed.
	 *
	 * @since BuddyPress 1.5.0
	 *
	 * @param int $blog_id ID of the blog having its item removed.
	 */
	do_action( 'bp_blogs_before_remove_blog', $blog_id );

	BP_Blogs_Blog::delete_blog_for_all( $blog_id );

	/**
	 * Fires after a "blog created" item has been removed from blogs
	 * tracker and activity feed.
	 *
	 * @since BuddyPress 1.0.0
	 *
	 * @param int $blog_id ID of the blog who had its item removed.
	 */
	do_action( 'bp_blogs_remove_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.