Clanbite Points JavaScript Since 1.3.0

wp.hooks.applyFilters( 'clanbite.points.shouldShowEarnedToast', boolean show, Object data )

Filters whether new awards are announced. Return false to stay silent for this batch.

Filter JavaScript

Parameters

$show (boolean)

Default true.

$data (Object)

Server response: awards (oldest first), summaries (one per point type), latest_id.

Example

wp.hooks.addFilter( 'clanbite.points.shouldShowEarnedToast', 'my-plugin/handler', function ( show, data ) {
	return show;
} );

Defined in inc/Points/earned-popup.js

Changelog

VersionDescription
1.3.0Introduced.