[buddypress-trac] [BuddyPress] #5276: Reduce global touches and encapsulate remaining globals into buddypress() instance

buddypress-trac noreply at wordpress.org
Wed Dec 4 21:04:45 UTC 2013


#5276: Reduce global touches and encapsulate remaining globals into buddypress()
instance
-----------------------------+-----------------------------
 Reporter:  johnjamesjacoby  |      Owner:  johnjamesjacoby
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  2.0
Component:  Core             |    Version:  1.0
 Severity:  normal           |   Keywords:  needs-patch
-----------------------------+-----------------------------
 We have a number of globals still lingering around, that should start
 making their way into the main BuddyPress class. These are what I found at
 a cursory glance:

 * $activities_template
 * $bp_activity_title
 * $bp_activity_no_activity
 * $blogs_template
 * $forum_template
 * $topic_template
 * $members_template
 * $friends_template
 * $groups_template
 * $requests_template
 * $invites_template
 * $thread_template
 * $message
 * $type
 * $groups
 * $group
 * $fields
 * $field
 * $profile_template
 * $group_name

 We should do what we do for `$bp` and stop referencing them directly, and
 instead encapsulate them into the main BuddyPress class. This will pave
 the way for allowing us to deprecate these globals in a future version,
 and ideally make our coding style a bit more sane for developers to figure
 out.

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


More information about the buddypress-trac mailing list