Created
October 4, 2018 01:13
-
-
Save KaineLabs/35023ea48395f1786d53919b3f629b72 to your computer and use it in GitHub Desktop.
Re-order Group Tabs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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