Block Member Posting for BuddyPress

The Block Member Posting for BuddyPress plugin enabled BuddyPress or BuddyBoss site administrators to block specific members or member(profile) types from creating new posts and making new comments.

How it works:

Block specific members

The administrators can block any specific member by going to the member’s edit page and selecting the appropriate fields.

Block specific members

Block members belonging to specific Member/Profile Types

To make the life of community managers easier, this plugin allows administrators to block all the members that belong to a specific member type with one click.

The admin just has to edit the member/profile type, and a set of options will appear. If they block a specific member type, all the members that belong to that type will be blocked.

What the blocked members see

When members are blocked from posting, they cannot create new posts. This works by removing the new post form from the entire website.

When members are blocked from commenting, they cannot comment on any activity post or reply to any comments.

Member Management

To make it easier to manage blocked members, two new columns have been added to the WordPress Users page:

  1. One that shows if the user cannot post.
  2. And one that shows if the user cannot comment.

Furthermore, two filters have been added to easily filter which blocked members you want to manage:

  1. Blocked Posting
  2. Blocked Commenting

Hooks

bp_is_member_posting_blocked: Allows the filtering of the check whether a member is blocked from posting or not.

return apply_filters( 'bp_is_member_posting_blocked', $is_blocked, $user_id );

bp_is_member_commenting_blocked: Allows the filtering of the check whether a member is blocked from commenting and replying to comments or not.

return apply_filters( 'bp_is_member_commenting_blocked', $is_blocked, $user_id );

bp_is_member_type_posting_blocked: Allows the filtering of the check whether a member type (BuddyPress) is blocked from posting.

return apply_filters( 'bp_is_member_type_posting_blocked', $is_blocked, $member_type, $term );

bp_is_member_type_commenting_blocked: Allows the filtering of the check whether a member type (BuddyPress) is blocked from commenting and replying.

return apply_filters( 'bp_is_member_type_commenting_blocked', $is_blocked, $member_type, $term );

bp_is_profile_type_posting_blocked: Allows the filtering of the check whether a profile type (BuddyBoss) is blocked from posting.

return apply_filters( 'bp_is_profile_type_posting_blocked', $is_blocked, $member_type, $post_id );

bp_is_profile_type_commenting_blocked: Allows the filtering of the check whether a profile type (BuddyBoss) is blocked from commenting and replying.

return apply_filters( 'bp_is_profile_type_commenting_blocked', $is_blocked, $member_type, $post_id );

bp_get_blocked_members_posting: Allows the filtering of the list of blocked members.

return apply_filters( 'bp_get_blocked_members_posting', $blocked_users_posting );

0 Comments

Leave a Reply