<?php
/*
Plugin Name: NoNewsPostsForMembers
Plugin URI: https://bbpress.org/forums/topic/no-new-posts-for-members
Description: No New posts for members
*/
function NoNewsPostsForMembers($roles) {
$roles['member']['capabilities']['write_posts'] = false;
return $roles;
}
add_filter('get_roles', 'NoNewsPostsForMembers');
?>
Put it in my-plugins
with any filename.php you like. Activate it. Then this should work.
Thanks, you rule! i’ll try it.
BTW what theme do you use at your website (forgetIT).
I made my modifications to the original theme Kakumei. If you have any questions about my modifications, you are welcome to ask me.
And what about restricting only new posts in some forums (ie. in forum 1 members can start topics but not in forum 2).
Is this also easy in bbpress? (i don’t need a fancy admin configuration, just a straight plugin with hardcored values).
Thanks.
Have you tried to search one in Extend?
If you find no plugin and you can do code, I think you can check line 18 in /bb-post.php, line 479 in /bb-includes/capabilities.php.
You need to check current user’s is allowed to start a new topic in specific forum or not in your filter hook.
Just thoughts, but should work.
PS. I think it’s better not to do too much that bbPress can’t by default, or you could suffer more after upgrading unless you completely know what you do.