Example #1
0
function bp_blogs_remove_data_for_blog($blog_id)
{
    global $bp;
    /* If this is regular blog, delete all data for that blog. */
    BP_Blogs_Blog::delete_blog_for_all($blog_id);
    BP_Blogs_Post::delete_posts_for_blog($blog_id);
    BP_Blogs_Comment::delete_comments_for_blog($blog_id);
    // Delete activity stream item
    bp_blogs_delete_activity(array('item_id' => $blog_id, 'component_name' => 'blogs', 'component_action' => false, 'user_id' => $bp->loggedin_user->id));
    do_action('bp_blogs_remove_data_for_blog', $blog_id);
}