apply_filters( 'clanbite_forums_user_can_view_category', bool $can, int $viewer_id, object $category, string $visibility, list<string> $roles )Whether a user may view a role-restricted category (after role list check).
Filter PHP
Parameters
$can(bool)Default false.
$viewer_id(int)User ID.
$category(object)Category row.
$visibility(string)Normalized visibility (
roles).$roles(list<string>)Allowed role slugs from storage.
Example
add_filter( 'clanbite_forums_user_can_view_category', function ( $can, $viewer_id, $category, $visibility, $roles ) {
// Change $can here.
return $can;
}, 10, 5 );Defined in inc/Forums/Visibility.php