BuddyDev

BuddyPress Default Group Tab

BuddyPress default group tab is a simple plugin that allows site admin/group admins to control the default landing component/page of a BuddyPress Group.

Features:-

  • Allow controlling the default landing component/page of a group

The good thing is, you can control which group has which component set as default landing page.

For example, In a group fashion, you can make the activity as the default landing page while in group education, you can make forum as the default landing page.

Faq:-

Does it work with BuddyPress Plugins using Group Extensions?

Indeed, it does.

Screenshots:-

Settings Screen:-

You can view this screen by visiting Individual Group->Admin->Settings Page

Example landing page:-

This is what happens when members is set as default tab.

Permissions:-

By default, site admins and group admins can change the tab. If you want to limit the tab change to certain roles, we have a filter for that. You can use the filter 'bp_default_group_tab_user_can_update_tab' to limit it. The attached callback will receive the current permission(Boolean) and the user id.

 

Here is an example where we restrict it to siteadmin only.

/**
 * Customize who can change the permission.
 *
 * @param bool $can is allowed?
 * @param int  $user_id for this user?
 *
 * @return bool
 */
function buddydev_custom_group_tab_permissions( $can, $user_id ) {
	return is_super_admin( $user_id );
}

add_filter( 'bp_default_group_tab_user_can_update_tab', 'buddydev_custom_group_tab_permissions', 10, 2 );

 

Release History

  • Version: 1.0.5

    Thursday, 16 December, 2021
    • Tested With: BuddyPress 10.3.0
    • Compatible With: BuddyPress 4.0+

    Fix bug not showing complete tab name in group settings

  • Version: 1.0.4

    Tuesday, 22 September, 2020
    • Tested With: BuddyPress 9.0.0
    • Compatible With: BuddyPress 4.0+

    Fix cases where the default tab was causing 404 due to inaccessible tabs. We only change default tab if the tab is accessible to the user.

  • Version: 1.0.3

    Thursday, 25 July, 2019
    • Tested With: BuddyPress 5.0
    • Compatible With: BuddyPress 2.6+

    Added a hook to restrict who can change the tab.

  • Version: 1.0.2

    Thursday, 15 February, 2018
    • Tested With: BuddyPress 2.8.2
    • Compatible With: BuddyPress 2.6+

    Updated to be compatible with BuddyPress 2.6+
    Released on: 06/05/2017
    Last tested: 02/15/2018

  • Version: 1.0.1

    Saturday, 25 April, 2015
    • Tested With: BuddyPress 2.2.3.1
    • Compatible With: BuddyPress 1.8+

    Move the select box to below everything on settings page.
    Tested with BuddyPress 2.2.3.1

  • Version: 1.0

    Thursday, 28 February, 2013
    • Tested With: BuddyPress 1.8
    • Compatible With: BuddyPress 1.6+

    Initial Release