apply_filters( ‘hooked_block_types’, string[] $hooked_block_types, string $relative_position, string $anchor_block_type, WP_Block_Template|WP_Post|array $context )

In this article

Filters the list of hooked block types for a given anchor block type and relative position.

Parameters

$hooked_block_typesstring[]
The list of hooked block types.
$relative_positionstring
The relative position of the hooked blocks.
Can be one of 'before', 'after', 'first_child', or 'last_child'.
$anchor_block_typestring
The anchor block type.
$contextWP_Block_Template|WP_Post|array
The block template, template part, wp_navigation post type, or pattern that the anchor block belongs to.

Source

$hooked_block_types = apply_filters( 'hooked_block_types', $hooked_block_types, $relative_position, $anchor_block_type, $context );

Changelog

VersionDescription
6.4.0Introduced.

User Contributed Notes

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