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

buddypress-trac noreply at wordpress.org
Sun Aug 15 20:51:37 UTC 2021


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

 * version:  9.0.0 => 1.0


Comment:

 Hi @espellcaste

 Thanks a lot for your work and patch about this improvement. I'll look at
 it in detail asap. Here's some first thoughts:

 - what about `bp_get_group_by( $field, $value )` like the WP
 `get_user_by()` function?
 - It seems weird to have the `from_param` suffix and being able to pass
 the entire Group object. I would probably have used a `bp_get_group(
 $group_id_or_group_object )` and used `bp_get_group_by( 'id', $value )`
 function inside it in case a Group ID was passed.

 I've changed the version to 1.0 as this was the BuddyPress version when
 `bp_get_group_avatar()` was introduced.

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


More information about the buddypress-trac mailing list