Clanbite Forums REST

apply_filters( 'clanbite_forums_user_can_post_topic', bool $can, int $viewer_id, object $forum, string $policy )

Filter whether the user may create topics for this forum’s post policy (after staff bypass and visibility checks).

Filter PHP

Parameters

$can (bool)

Core allow/deny.

$viewer_id (int)

User ID.

$forum (object)

Forum row.

$policy (string)

Normalized Visibility::forum_post_topics_visibility() value.

Example

add_filter( 'clanbite_forums_user_can_post_topic', function ( $can, $viewer_id, $forum, $policy ) {
	// Change $can here.
	return $can;
}, 10, 4 );

Defined in inc/Rest/Rest_Controller.php