post_content : ''; } /** * Parse and return the first block from a post's content. * * @param int $id Post ID * @return array Parsed block data */ public static function getBlock(int $id): array { $blocks = parse_blocks(self::get($id)); return $blocks[0] ?? []; } /** * Render the first block from a post's content. * * @param int $id Post ID * @return string Rendered block HTML */ public function render_block(int $id): string { $block = self::getBlock($id); if (empty($block)) { return ''; } return render_block($block); } }