Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Plugin Name: Restrict New Topic
- Description: Restrict new topic creation by members
- Version: 0.1
- this is not my plugin, I am just pasting it here for convenience
- see http://bbpress.org/forums/topic/restrict-new-topic for the
- original. chrishajer@gmail.com
- */
- function restrict_bb_got_roles() {
- global $bb_roles;
- unset($bb_roles->roles['member']['capabilities']['edit_topics']);
- unset($bb_roles->roles['member']['capabilities']['write_topics']);
- unset($bb_roles->role_objects['member']->capabilities['edit_topics']);
- unset($bb_roles->role_objects['member']->capabilities['write_topics']);
- }
- add_action('bb_got_roles', 'restrict_bb_got_roles');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement