Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/22/2021 12:38:43 AM (3 years ago)
Author:
espellcaste
Message:

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)

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.