[buddypress-trac] [BuddyPress] #4064: Adding hooks into group count functions in bp-groups-classes (incl. patch)
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Sun Mar 11 16:58:34 UTC 2012
#4064: Adding hooks into group count functions in bp-groups-classes (incl. patch)
-------------------------+----------------------
Reporter: drassi | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Core | Version:
Severity: normal | Resolution: invalid
Keywords: has-patch |
-------------------------+----------------------
Changes (by boonebgorges):
* status: new => closed
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
We're happy to add filters when needed. When possible, though, we prefer
to avoid adding filters directly to SQL queries.
In your case, I believe there are already filtered template functions that
provide the values you're looking for. For a total site group count, use
bp_get_total_group_count(). For a count of a user's groups, use
bp_get_total_group_count_for_user(). See
https://buddypress.trac.wordpress.org/browser/tags/1.5.4/bp-groups/bp-
groups-template.php#L1642 These functions get their values from the query
methods you have patched, and they already have filters in place.
Going to close this ticket as invalid in the meantime. If there's a reason
why those template functions won't work, feel free to reopen the ticket
with further explanation. Thanks!
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4064#comment:2>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list