Clanbite Social Kit Since 1.6.2

viewer_can_view_post( int $post_id, int $viewer_id ): bool

Whether a viewer may read a post, by ID (used by the shared reactions service for posts and comments).

public

Class: Kernowdev\ClanbiteSocialKit\Rest\Rest_Controller

Parameters

$post_id (int) Required

Social post ID.

$viewer_id (int) Required

Viewer user ID (0 if logged out).

Returns

bool

Defined in inc/Rest/Rest_Controller.php

Changelog

VersionDescription
1.6.2Introduced.