Re: Changing Group tab display defaults
This function creates an infinite loop if the MOD didn’t enable discussion forums for their group.
Updated code to check for that:
`function redirect_to_forum() {
global $bp;
$path = clean_url( $_SERVER );
$path = apply_filters( ‘bp_uri’, $path );
if ( bp_is_group_home() && strpos( $path, $bp->bp_options_nav ) === false ) {
if( $bp->bp_options_nav )
bp_core_redirect( $path . $bp->bp_options_nav . ‘/’ );
}
}
add_action( ‘wp’, ‘redirect_to_forum’ );`