Core Function
View Source on Trac ↗ insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata()
insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata(
mixed $parsed_anchor_block,
mixed $relative_position,
mixed $hooked_blocks,
mixed $context
) Returns the markup for blocks hooked to the given anchor block in a specific relative position and then
Parameters 4 required
| Name / Type | Description |
|---|---|
| $parsed_anchor_block array | The anchor block, in parsed block array format. Required |
| string | $relative_position The relative position of the hooked blocks. Can be one of 'before', 'after', 'first_child', or 'last_child'. Required |
| $hooked_blocks array | An array of hooked block types, grouped by anchor block and relative position. Required |
| (WP_Block_Template | | WP_Post | array) $context The block template, template part, or pattern that the anchor block belongs to. Required |
Return Value
(string)
string
Function Information
Since Version
6.6.0
Source File
wp-includes/blocks.php
Advertisement