Clanbite Forums

user_can_view_category( int $viewer_id, object $category ): bool

Whether the viewer may see a published category (and forums grouped under it) on the front end.

public static

Class: Kernowdev\ClanbiteForums\Forums\Visibility

Parameters

$viewer_id (int) Required

WordPress user ID (0 = guest).

$category (object) Required

Category row (status should be checked separately for drafts).

Returns

bool

Defined in inc/Forums/Visibility.php