|Reported by:||johnjamesjacoby||Owned by:||johnjamesjacoby|
Much of the clean-up of 1.5 and 1.6 paved the way for BuddyPress to eventually move away from needing to define the $bp global we've all come to know and love. The next part of this is turning the BuddyPress class into a singleton, with magic methods for getting/setting/checking the individual variables it uses.
bbPress has already gone this route in 2.1, though it completely removed its dependency on the $bbp global (it was only around for 1 version, with single-digit plugins using it.) Totally eliminating the $bp global will be much more difficult to do, though we can easily go it through-out BuddyPress core as we go.
Attached patch finishes the singleton job, but keeps the $bp global around as a byref to the singleton.