Add or remove buddypress tabs

Customize profile menus in BuddyPress

Customize BuddyPress Tabs

Change menu/tabs in the members profile

// Change Profile menu/tab order
function rt_change_profile_tab_order() {
   global $bp;

   $bp->members->nav->edit_nav( array(
      'position' => 10,
   ), 'profile' );
   $bp->members->nav->edit_nav( array(
      'position' => 20,
   ), 'activity' );
   $bp->members->nav->edit_nav( array(
      'position' => 30,
   ), 'friends' );
   $bp->members->nav->edit_nav( array(
      'position' => 40,
   ), 'groups' );
   $bp->members->nav->edit_nav( array(
      'position' => 50,
   ), 'messages' );
   $bp->members->nav->edit_nav( array(
      'position' => 60,
   ), 'settings' );
}
add_action( 'bp_init', 'rt_change_profile_tab_order', 999 );

Rename a menu/tabs

$bp->members->nav->edit_nav( array(
'name' => 'Timeline',
), 'activity' );

Remove a menu item

bp_core_remove_nav_item( 'notifications', 'members' );

Reference link for this function – http://hookr.io/functions/bp_core_remove_nav_item/

Changes in groups menu/tabs

Change menu order in groups

function rt_bp_groups_forum_first_tab() {
   global $bp;

   if( bp_is_group() ) {
      $bp->groups->nav->edit_nav( array(
         'position' => 70 ),
      'home', bp_current_item() );
   }
}
add_action('bp_actions', 'rt_bp_groups_forum_first_tab');

Rename menu nav item

$bp->groups->nav->edit_nav( array(
'name' =>  bp_current_item() ),
'home', bp_current_item() );

Remove menu nav item

bp_core_remove_subnav_item( bp_current_item(), 'media', 'groups' );

Reference link: