Title: hooked_block
Published: April 3, 2024
Last modified: February 24, 2026

---

# 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

 * [Parameters](https://developer.wordpress.org/reference/hooks/hooked_block/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/hooked_block/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/hooked_block/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/hooked_block/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/hooked_block/?output_format=md#wp--skip-link--target)

Filters the parsed block array for a given hooked block.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/hooked_block/?output_format=md#parameters)󠁿

 `$parsed_hooked_block`array|null

The parsed block array for the given hooked block type, or null to suppress the 
block.

`$hooked_block_type`string

The hooked block type name.

`$relative_position`string

The relative position of the hooked block.

`$parsed_anchor_block`array

The anchor block, in parsed block array format.

`$context`[WP_Block_Template](https://developer.wordpress.org/reference/classes/wp_block_template/)
|[WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)|array

The block template, template part, post object, or pattern that the anchor block
belongs to.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/hooked_block/?output_format=md#source)󠁿

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

[View all references](https://developer.wordpress.org/reference/files/wp-includes/blocks.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/blocks.php#L990)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/blocks.php#L990-L990)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/hooked_block/?output_format=md#related)󠁿

| Used by | Description | 
| [set_ignored_hooked_blocks_metadata()](https://developer.wordpress.org/reference/functions/set_ignored_hooked_blocks_metadata/)`wp-includes/blocks.php` |

Adds a list of hooked block types to an anchor block’s ignored hooked block types.

  | 
| [insert_hooked_blocks()](https://developer.wordpress.org/reference/functions/insert_hooked_blocks/)`wp-includes/blocks.php` |

Returns the markup for blocks hooked to the given anchor block in a specific relative position.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/hooked_block/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.5.0](https://developer.wordpress.org/reference/since/6.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fhooked_block%2F)
before being able to contribute a note or feedback.