コード例 #1
0
function bp_blogs_remove_data_for_blog($blog_id)
{
    global $bp;
    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);
    // Delete activity stream item
    bp_blogs_delete_activity(array('item_id' => $blog_id, 'component' => $bp->blogs->id, 'type' => false));
    do_action('bp_blogs_remove_data_for_blog', $blog_id);
}
コード例 #2
0
/**
 * Remove the all data related to a given blog from the BP blogs tracker and activity stream.
 *
 * @param int $blog_id The ID of the blog to expunge.
 */
function bp_blogs_remove_data_for_blog($blog_id)
{
    global $bp;
    /**
     * Fires before all data related to a given blog is removed from blogs tracker
     * and activity stream.
     *
     * @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);
    // Delete activity stream item
    bp_blogs_delete_activity(array('item_id' => $blog_id, 'component' => $bp->blogs->id, 'type' => false));
    /**
     * Fires after all data related to a given blog has been removed from blogs tracker
     * and activity stream.
     *
     * @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);
}
コード例 #3
0
/**
 * Remove the all data related to a given blog from the BP blogs tracker and activity stream.
 *
 * @param int $blog_id The ID of the blog to expunge.
 */
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 stream.
     *
     * @since 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 stream.
     *
     * @since 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);
}
コード例 #4
0
ファイル: bp-blogs.php プロジェクト: alvaropereyra/shrekcms
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);
}
コード例 #5
0
/**
 * Remove the all data related to a given blog from the BP blogs tracker and activity stream.
 *
 * @param int $blog_id The ID of the blog to expunge.
 */
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 stream.
     *
     * @since 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);
    /**
     * Delete activity stream item only if the Activity component is active
     *
     * @see https://buddypress.trac.wordpress.org/ticket/6937
     */
    if (bp_is_active('activity')) {
        bp_blogs_delete_activity(array('item_id' => $blog_id, 'component' => buddypress()->blogs->id, 'type' => false));
    }
    /**
     * Fires after all data related to a given blog has been removed from blogs tracker
     * and activity stream.
     *
     * @since 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);
}