mycred_bp_leaderboard_get
Description
This filter allows you to adjust or run your own custom query for BuddyPress leaderboards. This filter used by the myCRED BP Group Leaderboards plugin. The filter is used each time a leaderboard is rendered so it is important that you cache your results to prevent having to run potentially expensive queries on every page load.
Available since version 1.1
Parameters
Param | Type | Required | Description |
---|---|---|---|
$leaderboard |
array | Yes | The leaderboard array. |
$group_id |
int | No | The BuddyPress Group id. |
$point_type |
string | No | The myCRED point type the leaderboard is based on. |
$append_user |
int or bool | No | The WordPress user ID of a user to append to the end of the leaderboard. |
$fresh |
bool | No |
|
Used By
Package | Prio. | Description |
---|---|---|
Not used by any built-in package. |
Examples
Example 1: Example of how to run a custom leaderboard query based on annual point gains.