Using a WordPress multisite network with Buddypress. In order to modify the top nav bar, I've written a function to replace part of the menu. Calling it thus:
add_action('bp_adminbar_menus', 'new_adminbar_blogs_menu', 6);
remove_action('bp_adminbar_menus', 'bp_adminbar_blogs_menu', 6);
Works perfectly in my functions.php, but when I try to move the above code to the plugin file, the remove_action fails to fire, but the add_action works as expected.
As a temporary solution, renaming the function folder to something appearing after Buddypress alphabetically solved the issue.