コード例 #1
0
function bp_blogs_remove_blog_for_user($user_id, $blog_id)
{
    global $bp;
    $blog_id = (int) $blog_id;
    $user_id = (int) $user_id;
    do_action('bp_blogs_before_remove_blog_for_user', $blog_id, $user_id);
    BP_Blogs_Blog::delete_blog_for_user($blog_id, $user_id);
    // Delete activity stream item
    bp_blogs_delete_activity(array('item_id' => $blog_id, 'component' => $bp->blogs->id, 'type' => 'new_blog'));
    do_action('bp_blogs_remove_blog_for_user', $blog_id, $user_id);
}
コード例 #2
0
/**
 * Remove a blog from the tracker for a specific user.
 *
 * @param int $user_id ID of the user for whom the blog is being removed.
 * @param int $blog_id ID of the blog being removed.
 */
function bp_blogs_remove_blog_for_user($user_id, $blog_id)
{
    global $bp;
    $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);
    // Delete activity stream item
    bp_blogs_delete_activity(array('item_id' => $blog_id, 'component' => $bp->blogs->id, 'type' => 'new_blog'));
    /**
     * 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);
}
コード例 #3
0
/**
 * Remove a blog from the tracker for a specific user.
 *
 * @param int $user_id ID of the user for whom the blog is being removed.
 * @param int $blog_id ID of the blog being removed.
 */
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 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 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);
}
コード例 #4
0
ファイル: bp-blogs.php プロジェクト: alvaropereyra/shrekcms
function bp_blogs_remove_blog_for_user($user_id, $blog_id)
{
    global $current_user;
    $blog_id = (int) $blog_id;
    $user_id = (int) $user_id;
    BP_Blogs_Blog::delete_blog_for_user($blog_id, $user_id);
    // Delete activity stream item
    bp_blogs_delete_activity(array('item_id' => $blog_id, 'component_name' => 'blogs', 'component_action' => 'new_blog', 'user_id' => $current_user->ID));
    do_action('bp_blogs_remove_blog_for_user', $blog_id, $user_id);
}
コード例 #5
0
/**
 * Remove a blog from the tracker for a specific user.
 *
 * @param int $user_id ID of the user for whom the blog is being removed.
 * @param int $blog_id ID of the blog being removed.
 */
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 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);
    /**
     * 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' => 'new_blog'));
    }
    /**
     * Fires after a blog has been removed from the tracker for a specific user.
     *
     * @since 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);
}