Clanbite

clanbite_team_block_resolve_team_id( array $block_context = array() ): int

Resolve the current cp_team post ID for team blocks.

Order: block context (postId / postType, e.g. Query Loop) → main-query singular cp_team (covers plugin block templates before the_post()) → get_the_ID() → global $post → queried object.

Parameters

$block_context (array<string, mixed>) Optional

Block context ($block->context).

Default: array()

Returns

int Team post ID or 0 when none applies.

Defined in inc/extensions/teams/functions.php