Re: [Resolved] Customizing bp_get_displayed_user_nav()
I have not looked at your pasted code. But you are correct in stating that bp-custom.php loads prior to the accessory core BP files. I’d suggest the following tweaks:
remove_action( ‘bp_setup_nav’, ‘friends_setup_nav’, 5);
add_action( ‘bp_setup_nav’, ‘my_friends_setup_nav’);
Basically, hooks are defaulted to a priority of 10. So, you want to make sure that friends_setup_nav is removed before your custom my_friends_setup_nav() is added.
This is just a quick stab at guessing the proper hook firing sequence. So, if this does not work, I suggest installing my WordPress Hook Sniffer plugin.