insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata( array $parsed_anchor_block, string $relative_position, array $hooked_blocks, WP_Block_Template|WP_Post|array $context ): string

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Returns the markup for blocks hooked to the given anchor block in a specific relative position and then adds a list of hooked block types to an anchor block’s ignored hooked block types.

Description

This function is meant for internal use only.

Parameters

$parsed_anchor_blockarrayrequired
The anchor block, in parsed block array format.
$relative_positionstringrequired
The relative position of the hooked blocks.
Can be one of 'before', 'after', 'first_child', or 'last_child'.
$hooked_blocksarrayrequired
An array of hooked block types, grouped by anchor block and relative position.
$contextWP_Block_Template|WP_Post|arrayrequired
The block template, template part, or pattern that the anchor block belongs to.

Return

string

Source

function insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata( &$parsed_anchor_block, $relative_position, $hooked_blocks, $context ) {
	$markup  = insert_hooked_blocks( $parsed_anchor_block, $relative_position, $hooked_blocks, $context );
	$markup .= set_ignored_hooked_blocks_metadata( $parsed_anchor_block, $relative_position, $hooked_blocks, $context );

	return $markup;
}

Changelog

VersionDescription
6.6.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.