mycred_bp_leaderboard_types

Description

This filter allows you to adjust, add or remove leaderboards types in the myCRED BP Group Leaderboards plugin.

Available since version 1.1

Parameters

Param Type Required Description
$leaderboards array Yes

An associative array of leaderboard type keys and labels.

Used By

Package Prio. Description
Not used by any built-in package.

Examples

Example 1: Example on how to remove one type and adding another.

function mycred_pro_adjust_bp_leaderboard_types( $leaderboards ) {

	// Remove total balance lederboards
	unset( $leaderboards['total'] );

	// Add a custom leaderboard
	$leaderboards['year'] = 'Annual Leaderboard';

	return $leaderboards;

}
add_filter( 'mycred_bp_leaderboard_types', 'mycred_pro_adjust_bp_leaderboard_types' );