Deactivating bbpress in sub-sites
- This topic has 2 replies, 2 voices, and was last updated 8 years ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Hi, met with our development team and I’m loaded up on fresh questions.
We are using the sub-sites in our install for participant portfolios/blogs and are trying to keep things as simple as possible. Because bbpress is network activated through CBox, a set of forum admin items appear on the dashboard menus of sub-sites. It is very unlikely that participants will need forums on the sub-sites, so our aim is to remove the option.
I can think of four possible ways to approach (actually it can sort of be reduced to two: deactivate plugin or high menu items):
My preference is probably approach 2 as it gives use further flexibility. I’m concerned about it stepping on CBox/Buddypress in some way.
Any thoughts?
Thanks
Troy
@troy The way it’s been recommended on this forum previously is to create a simple mu-plugin with the following code in it:
function cbox_remove_forums_from_child_sites( $plugins ) {
if ( is_multisite() AND ! is_main_site() ) {
unset($plugins['bbpress/bbpress.php']);
}
return $plugins;
}
add_filter( 'site_option_active_sitewide_plugins', 'cbox_remove_forums_from_child_sites' );
Perfect, thank you very much.