Skip to main content

benecaster_badge_definition_updated

Action Free Since v1.0.0

Fires after an existing badge definition is saved with new values. The change is already stored by the time your listener runs.

You receive both the updated badge and $previous, the badge exactly as it stood beforehand. Compare the two to react only to changes you care about — a label rename, an icon swap, a color change — without having to keep your own copy of the previous state between saves. Use for mirroring badge changes into an external system, refreshing a cache, or regenerating badge artwork when the icon changes.

Parameters

Name Type Default Description
$id int Badge definition ID
$badge array The updated badge row
$previous array The row as it stood immediately before the update