Clanbite Points Since 1.4.0

revoke( string $ref, int $user_id = 0 ): int

Take back the points a reference earned (a deleted post, a removed reaction, an ended friendship).

Every live award recorded for $ref, and for anything beneath it (sk_post:34 also covers sk_post:34:comment:9), gets a matching negative ledger row and is taken off the member's balance, which never drops below zero. Awards made before references were recorded cannot be matched and stay. An award is taken back at most once.

public static

Class: Kernowdev\ClanbitePoints\Points\Engine

Parameters

$ref (string) Required

Reference passed as points_ref in the award context.

$user_id (int) Optional

Only take back this member's points (0 = whoever earned them).

Default: 0

Returns

int Points taken back in total, as a positive number.

Defined in inc/Points/Engine.php

Changelog

VersionDescription
1.4.0Introduced.