Clanbite Forums Forums

apply_filters( 'clanbite_forums_allow_topic_reaction', bool $allow, string $slug, int $topic_id, int $forum_id, int $user_id )

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

Filter PHP

Parameters

$allow (bool)

Whether the reaction is allowed (default true).

$slug (string)

Reaction type slug.

$topic_id (int)

Topic ID.

$forum_id (int)

Forum ID.

$user_id (int)

User ID.

Example

add_filter( 'clanbite_forums_allow_topic_reaction', function ( $allow, $slug, $topic_id, $forum_id, $user_id ) {
	// Change $allow here.
	return $allow;
}, 10, 5 );

Defined in inc/Forums/Reaction_Registry.php