Advertisement
Guest User

Chris Hajer

a guest
Feb 2nd, 2008
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.68 KB | None | 0 0
  1. <?php
  2. /*
  3. Plugin Name: Restrict New Topic
  4. Description: Restrict new topic creation by members
  5. Version: 0.1
  6.  
  7.    this is not my plugin, I am just pasting it here for convenience
  8.    see http://bbpress.org/forums/topic/restrict-new-topic for the
  9.    original.   chrishajer@gmail.com
  10.  
  11. */
  12.  
  13. function restrict_bb_got_roles() {
  14. global $bb_roles;
  15. unset($bb_roles->roles['member']['capabilities']['edit_topics']);
  16. unset($bb_roles->roles['member']['capabilities']['write_topics']);
  17.  
  18. unset($bb_roles->role_objects['member']->capabilities['edit_topics']);
  19. unset($bb_roles->role_objects['member']->capabilities['write_topics']);
  20. }
  21.  
  22. add_action('bb_got_roles', 'restrict_bb_got_roles');
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement