[buddypress-trac] [BuddyPress Trac] #6749: bp_get_group_avatar() needs to work outside the loop

buddypress-trac noreply at wordpress.org
Sun Aug 22 00:38:49 UTC 2021


#6749: bp_get_group_avatar() needs to work outside the loop
-------------------------------------------------+-------------------------
 Reporter:  slaFFik                              |       Owner:
                                                 |  espellcaste
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  10.0.0
Component:  Groups                               |     Version:  1.0
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests dev-        |
  reviewed                                       |
-------------------------------------------------+-------------------------
Changes (by espellcaste):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"13085" 13085]:
 {{{
 #!CommitTicketReference repository="" revision="13085"
 We are introducing in this commit two new helper functions to get a group:
 `bp_get_group_by` and `bp_get_group`. The former allows for getting a
 group by id/ID or slug.
 And the latter allows for getting a group by id/ID, group object, slug.
 And when used in the context of a Group loop built by the
 `BP_Groups_Template` class, it defaults to the Group being iterated on.

 - The new helper functions were applied to several functions in the Group
 component.
 - `bp_group_is_visible` was updated to check against a specific user ID.
 Previously, only the current logged in user was verified.
 - `bp_get_group_avatar` was updated to use the new functions and new
 arguments that are passed to `bp_core_fetch_avatar` were added.
 - PHPDoc were updated to reflect those changes.

 Props imath, boonebgorges and DJPaul

 Fixes #6749 (trunk)
 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6749#comment:12>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list