Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Take away Create a Group option


Burt Adsit
Participant

@burtadsit

Hi wardeh. I was checking the ‘topics with no replies’ and saw you here. All by your lonesome self. How goes the battle this week?

You don’t want to turn off groups but you just don’t want the option to create more groups to be available. Well, you want group creation to be a site admin thing only. Hmmm…

I went and looked at the member theme code and finally arrived in the core code and lo and behold Andy was thinking of you! There is an unused option for the menu items. ‘site admin’ only. You’ll have to modify one line to turn off the group creation option for everyone except you.

In the file /mu-plugins/bp-groups.php at line 205. This currently reads:

bp_core_add_subnav_item( $bp, 'create', __('Create a Group', 'buddypress'), $groups_link, 'groups_screen_create_group', false, bp_is_home() );

Change that line to read:

bp_core_add_subnav_item( $bp, 'create', __('Create a Group', 'buddypress'), $groups_link, 'groups_screen_create_group', false, bp_is_home(), true );

That change adds the ‘true’ parameter at the end which normally defaults to ‘false’. It’s the ‘site admin only’ sees this menu item flag.

Merry Christmas. :)

Skip to toolbar