BuddyDev

Search

[Resolved] Allows Site Admin/Group admin to select default landing page for each group

  • Participant
    Peter Fowke on #16017

    I want a turnoff group admin, is it possible to allow only site admin select the default landing page for each group?

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #16021

    Hi Peter,
    We are adding the permissions system today/tomorrow and pushing an update.
    I will share the code and a filter to disable it for group admins after that.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #16039

    Hi Peter,
    I have updated the plugin. Please upgrade to 1.0.3
    https://buddydev.com/plugins/bp-default-group-tab/

    after that, please put this code in your bp-custom.php or your theme’s functions.php

    
    
    /**
     * 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 );
    
    

    It restrict the change to site admin only.

    Hope that helps.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #16273

    Marking it as resolved. Please let me know if you still have issues.

You must be logged in to reply to this topic.

This topic is: resolved