[buddypress-trac] [BuddyPress] #4470: BuddyPress Singleton

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Sun Aug 26 00:54:48 UTC 2012


#4470: BuddyPress Singleton
-----------------------------+-----------------------------
 Reporter:  johnjamesjacoby  |      Owner:  johnjamesjacoby
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  1.7
Component:  Core             |    Version:
 Severity:  normal           |   Keywords:  has-patch
-----------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4470>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list