apply_filters( ‘hooked_block’, array|null $parsed_hooked_block, string $hooked_block_type, string $relative_position, array $parsed_anchor_block, WP_Block_Template|WP_Post|array $context )

In this article

Filters the parsed block array for a given hooked block.

Parameters

$parsed_hooked_blockarray|null
The parsed block array for the given hooked block type, or null to suppress the block.
$hooked_block_typestring
The hooked block type name.
$relative_positionstring
The relative position of the hooked block.
$parsed_anchor_blockarray
The anchor block, in parsed block array format.
$contextWP_Block_Template|WP_Post|array
The block template, template part, wp_navigation post type, or pattern that the anchor block belongs to.

Source

$parsed_hooked_block = apply_filters( 'hooked_block', $parsed_hooked_block, $hooked_block_type, $relative_position, $parsed_anchor_block, $context );

Changelog

VersionDescription
6.5.0Introduced.

User Contributed Notes

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