Skip to:

Re: Important~Need SHORT Term solution (until integrated in BP) to allow EDITOR role more functionality.

Boone Gorges


Unfortunately I don’t think there is a super easy short term solution.

You’d have to create a new WP capability, and then on each page load, you’d have to essentially spoof the proper BP permissions. For groups and forums that means $bp->is_item_admin. In the case of activity deletion, there isn’t really a good piece of data to spoof (aside from the activity’s user_id field, which is obviously used for other stuff like displaying the activity avatar and so probably shouldn’t be messed with). So you might need to build your own delete links, and then make your own function that replicates bp_activity_action_delete_activity() except that it (a) hooks earlier to `wp` (maybe with a priority of 2 rather than 3) and (b) replaces the `/* Check access */` business with your alternative.

The core team is hoping to make this sort of thing easier in 1.3. Once BP has taken better account of proper user roles, I think it’d be an appropriate feature request that this sort of role be part of BP core, as it’s something that will be needed by pretty much any community site beyond a certain size.

Skip to toolbar