LH Buddypress Block Members

LH Buddypress Block Members lets members block one another, and lets staff block a member from the whole site. A personal block stops private messages passing between the two members in either direction. A site block strips the member down to read access until it is lifted or expires.

Features

Where the buttons appear

With the BP LocalHero template pack, Block / Unblock and Delete are registered as member header actions through its bp_localhero_member_actions filter, and appear in the profile header’s More menu, Block first. The pack’s script asks for confirmation before Delete, using the member’s name. With any other template pack (BP Legacy, BP Nouveau) the buttons are added to bp_member_header_actions as before, with the confirmation done inline.

How actions are submitted

Block, Unblock and Delete are POST forms with a WordPress nonce tied to the action and the member, never plain links, so prefetchers, link previews and crawlers cannot trigger them. Site blocks are stored as a term in a private user taxonomy, with the reason and end date kept against that relationship by LH Term Relationship Meta.

Requirements

BuddyPress, and LH Term Relationship Meta for site-block reasons and end dates.