Clanbite Social Kit Social

apply_filters( 'clanbite_social_kit_allow_reaction', bool $allow, string $slug, int $post_id, int $user_id )

Filters whether a user may apply a reaction to a post.

Filter PHP

Parameters

$allow (bool)

Whether the reaction is allowed (default true).

$slug (string)

Reaction type slug.

$post_id (int)

Post ID.

$user_id (int)

User ID.

Example

add_filter( 'clanbite_social_kit_allow_reaction', function ( $allow, $slug, $post_id, $user_id ) {
	// Change $allow here.
	return $allow;
}, 10, 4 );

Defined in inc/Social/Reaction_Registry.php