W3cubDocs

/WordPress

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 )

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

Version Description
6.5.0 Introduced.

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