Skip to:

Opened 10 years ago

Closed 6 years ago

#5276 closed enhancement (maybelater)

Reduce global touches and encapsulate remaining globals into buddypress() instance

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: Priority: normal
Severity: normal Version: 1.0
Component: Core Keywords: needs-patch, trac-tidy-2018


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.

Change History (9)

#1 @boonebgorges
10 years ago

Yup, this sounds good. But let's be sure that, in each case, we also define the legacy global by reference to the new location, so that plugins that directly reference the global will continue to work.

#2 @boonebgorges
10 years ago

  • Milestone changed from 2.0 to 2.1

#3 @DJPaul
10 years ago

  • Milestone changed from 2.1 to Future Release
  • Type changed from defect (bug) to task

#4 @DJPaul
10 years ago

  • Component changed from Core to All Components

#5 @johnjamesjacoby
9 years ago

  • Component changed from Component - Any/All to Tools - Code Improvement

#6 @DJPaul
8 years ago

  • Component changed from Tools - Code Improvement to Core

#7 @DJPaul
8 years ago

  • Type changed from task to enhancement

#8 @DJPaul
6 years ago

  • Keywords trac-tidy-2018 added

We're closing this ticket because it has not received any contribution or comments for at least two years. We have decided that it is better to close tickets that are good ideas, which have not gotten (or are unlikely to get) contributions, rather than keep things open indefinitely. This will help us share a more realistic roadmap for BuddyPress with you.

Everyone very much appreciates the time and effort that you spent sharing your idea with us. On behalf of the entire BuddyPress team, thank you.

If you feel strongly that this enhancement should still be added to BuddyPress, and you are able to contribute effort towards it, we encourage you to re-open the ticket, or start a discussion about it in our Slack channel. Please consider that time has proven that good ideas without contributions do not get built.

For more information, see
or find us on Slack, in the #buddypress channel:

#9 @DJPaul
6 years ago

  • Milestone Awaiting Contributions deleted
  • Resolution set to maybelater
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.