Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Created October 4, 2018 01:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/35023ea48395f1786d53919b3f629b72 to your computer and use it in GitHub Desktop.
Save KaineLabs/35023ea48395f1786d53919b3f629b72 to your computer and use it in GitHub Desktop.
Re-order Group Tabs.
<?php
/***
* Re-order Group Tabs.
*/
function yzc_reorder_group_tabs() {
global $bp;
if ( isset( $bp->groups->current_group->slug ) && $bp->groups->current_group->slug == $bp->current_item ) {
$bp->bp_options_nav[$bp->groups->current_group->slug]['home']['position'] = 10;
$bp->bp_options_nav[$bp->groups->current_group->slug]['members']['position'] = 60;
$bp->bp_options_nav[$bp->groups->current_group->slug]['notifications']['position'] = 110;
}
}
add_action( 'bp_setup_nav', 'yzc_reorder_group_tabs', 100000 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment