Use buddypress() instead of the $bp global