apply_block_hooks_to_content()
apply_block_hooks_to_content( mixed $content, mixed $context = null, mixed $callback = 'insert_hooked_blocks' ) Runs the hooked blocks algorithm on the given content.
Parameters 3 required
| Name / Type | Description |
|---|---|
| $content string | Serialized content. Required |
| mixed | (WP_Block_Template | WP_Post | array | null) $context A block template, template part, post object, or pattern that the blocks belong to. If set to `null`, `get_post()` will be called to use the current post as context. Default: `null`. Required |
| callable | $callback A function that will be called for each block to generate the markup for a given list of blocks that are hooked to it. Default: 'insert_hooked_blocks'. Required |