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.
The leaderboard array.
The BuddyPress Group id.
The myCRED point type the leaderboard is based on.
|int or bool
The WordPress user ID of a user to append to the end of the leaderboard.
|Not used by any built-in package.
Example 1: Example of how to run a custom leaderboard query based on annual point gains.