apply_filters( 'clanbite_event_viewer_can_see', bool $can, string $event_type, int $event_id, int $viewer_id )Filter whether the viewer can see an event.
Use this to enforce visibility rules for custom event types (e.g. Groups).
Filter PHP
Parameters
$can(bool)Whether the viewer can see the event.
$event_type(string)Event type slug.
$event_id(int)Event ID.
$viewer_id(int)Viewer user ID (0 for anon).
Example
add_filter( 'clanbite_event_viewer_can_see', function ( $can, $event_type, $event_id, $viewer_id ) {
// Change $can here.
return $can;
}, 10, 4 );Defined in inc/events/class-events.php