Clanbite Social Kit

get_social_feed_block_initial_snapshot( string $feed_context, int $profile_user_id, int $team_id, int $per_page = 10, int $group_id = 0 ): array{ok: true, posts: array<int, array<string, mixed>>, total: int, pages: int, page: int}|array{ok: false, reason: string}

First page of posts for the social-feed block server render (includes media; same shape as REST).

Kept for backwards compatibility: maps the legacy per-context arguments onto self::get_feed_context_snapshot(). New code should call that method.

public

Class: Kernowdev\ClanbiteSocialKit\Rest\Rest_Controller

Parameters

$feed_context (string) Required

Feed context slug (home, profile, team, group or a registered one).

$profile_user_id (int) Required

Profile user ID when context is profile.

$team_id (int) Required

Team post ID when context is team.

$per_page (int) Optional

Page size (max 50).

Default: 10

$group_id (int) Optional

Group post ID when context is group.

Default: 0

Returns

array{ok: true, posts: array<int, array<string, mixed>>, total: int, pages: int, page: int}|array{ok: false, reason: string}

Defined in inc/Rest/Rest_Controller.php