bp_blogs_remove_blog_for_user( int $user_id, int $blog_id )
Remove a blog from the tracker for a specific user.
Description
Parameters
- $user_id
-
(Required) ID of the user for whom the blog is being removed.
- $blog_id
-
(Required) ID of the blog being removed.
Source
File: bp-blogs/bp-blogs-functions.php
function bp_blogs_remove_blog_for_user( $user_id, $blog_id ) {
$blog_id = (int) $blog_id;
$user_id = (int) $user_id;
/**
* Fires before a blog is removed from the tracker for a specific user.
*
* @since BuddyPress 1.5.0
*
* @param int $blog_id ID of the blog being removed.
* @param int $user_id ID of the user having the blog removed for.
*/
do_action( 'bp_blogs_before_remove_blog_for_user', $blog_id, $user_id );
BP_Blogs_Blog::delete_blog_for_user( $blog_id, $user_id );
/**
* Fires after a blog has been removed from the tracker for a specific user.
*
* @since BuddyPress 1.0.0
*
* @param int $blog_id ID of the blog that was removed.
* @param int $user_id ID of the user having the blog removed for.
*/
do_action( 'bp_blogs_remove_blog_for_user', $blog_id, $user_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.