id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 4209,bp_get_displayed_user_nav() should have exclusion argument. (code included),DennisSmolek,,"I am doing a Nav where I would like to keep the profile and settings pages, and in fact call them later, but I am trying to keep them off the ""Main"" Nav. Now as a hack I am changing the $bp->bp_nav array and then resetting it after my call as in my case I need it later but that means 2 functions to exclude items from this UL list and a lot of janking with the $bp global. A simpler approach would be to have the bp_get_user_nav() accept arguments including a exclusion array. This way $bp is never effected in any subsequent calls (like mine for my ""accounts"" page) This would also have the benefit of allowing things like groups without the friends component showing up on the main nav if the owner didn't want it or in my case where admins have the ability to edit profiles, but the users do not. (a simple conditional) I dont have a whole patch file but I do have a working example: from bp-members-template.php line 746 {{{ function bp_get_displayed_user_nav( $args='' ) { global $bp; if ($args['exclude']) { foreach ($args['exclude'] as $key => $value) { $exclude[$value] = true; } } foreach ( (array)$bp->bp_nav as $user_nav_item ) { if ( !$user_nav_item['show_for_displayed_user'] && !bp_is_my_profile() || $exclude[$user_nav_item['slug']] ) continue; if ( $bp->current_component == $user_nav_item['slug'] ) $selected = ' class=""current selected""'; else $selected = ''; if ( $bp->loggedin_user->domain ) $link = str_replace( $bp->loggedin_user->domain, $bp->displayed_user->domain, $user_nav_item['link'] ); else $link = $bp->displayed_user->domain . $user_nav_item['link']; echo apply_filters_ref_array( 'bp_get_displayed_user_nav_' . $user_nav_item['css_id'], array( '
  • ' . $user_nav_item['name'] . '
  • ', &$user_nav_item ) ); } } }}} And to Call it: {{{ array('profile' , 'settings'))); ?> }}} This example works as expected. Maintains the URL's and Slugs but removes the items from the nav menu without effecting $bp. ",enhancement,closed,normal,,Toolbar & Notifications,1.5.5,normal,maybelater,"dev-feedback, trac-tidy-2018",DennisSmolek