@mercime , thanks for the link. I did that on bp_adminbar_login_menu successfully, but when it comes to bp_adminbar_account_menu, the array codes beyond my ability, so I am thinking to use bp_core_remove_subnav_item. Maybe it’s not the way–still need to work with the bp_options_nav array.
This is where bp get the sub-nav:
` $counter = 0;
foreach( (array)$bp->bp_nav as $nav_item ) {
$alt = ( 0 == $counter % 2 ) ? ‘ class=”alt”‘ : ”;
echo ‘
‘;
echo ‘‘ . $nav_item . ‘‘;
if ( is_array( $bp->bp_options_nav[$nav_item] ) ) {
echo ‘
‘;
$sub_counter = 0;
foreach( (array)$bp->bp_options_nav[$nav_item] as $subnav_item ) {
$link = str_replace( $bp->displayed_user->domain, $bp->loggedin_user->domain, $subnav_item );
$name = str_replace( $bp->displayed_user->userdata->user_login, $bp->loggedin_user->userdata->user_login, $subnav_item );
$alt = ( 0 == $sub_counter % 2 ) ? ‘ class=”alt”‘ : ”;
echo ‘
- ‘ . $name . ‘
‘;
$sub_counter++;
}
echo ‘
‘;
}
echo ‘
‘;
`
How can I check this array and filter items inside?