Clanbite Teams

apply_filters( 'clanbite_team_can_invite_players', bool $allowed, int $team_id, array<string,                        mixed> $options, \Kernowdev\Clanbite\Extensions\Teams $extension )

Filters whether players can be invited to a team (defaults to the team's allow_invites option).

Filter PHP

Parameters

$allowed (bool)

Whether inviting is allowed.

$team_id (int)

Team post ID.

$options (array<string, mixed>)

Team options.

$extension (\Kernowdev\Clanbite\Extensions\Teams)

Teams extension.

Example

add_filter( 'clanbite_team_can_invite_players', function ( $allowed, $team_id, $options, $extension ) {
	// Change $allowed here.
	return $allowed;
}, 10, 4 );

Defined in inc/extensions/teams/class-extension-teams.php

Changelog

VersionDescription
1.3.0Updated.