W3cubDocs

/WordPress

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

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

Version Description
6.4.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/hooked_block_types