Filter hook 'hooked_block_types'

in WP Core File wp-includes/blocks.php at line 886

Description

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

Occurrences

Filename Line Number
wp-includes/blocks.php 886
wp-includes/blocks.php 966

Parameters

Type Name Description
string[] $hooked_block_types The list of hooked block types.
string $relative_position The relative position of the hooked blocks. Can be one of 'before', 'after', 'first_child', or 'last_child'.
string $anchor_block_type The anchor block type.
WP_Block_Template|WP_Post|array $context The block template, template part, `wp_navigation` post type, or pattern that the anchor block belongs to.

PHP Doc

/**
	 * Filters the list of hooked block types for a given anchor block type and relative position.
	 *
	 * @since 6.4.0
	 *
	 * @param string[]                        $hooked_block_types The list of hooked block types.
	 * @param string                          $relative_position  The relative position of the hooked blocks.
	 *                                                            Can be one of 'before', 'after', 'first_child', or 'last_child'.
	 * @param string                          $anchor_block_type  The anchor block type.
	 * @param WP_Block_Template|WP_Post|array $context            The block template, template part, `wp_navigation` post type,
	 *                                                            or pattern that the anchor block belongs to.
	 */