render_block_data WordPress Filter Hook
The render_block_data hook is used to modify the data that is used to render a block. This hook is called before a block is rendered, and allows you to modify the data that is used to render the block. This can be used to add or remove data from the data that is used to render the block.
apply_filters( 'render_block_data', array $parsed_block , array $source_block , WP_Block|null $parent_block ) #
Filters the block being rendered in render_block(), before it’s processed.
Parameters
- $parsed_block
(array)The block being rendered.
- $source_block
(array)An un-modified copy of $parsed_block, as it appeared in the source content.
- $parent_block
(WP_Block|null)If this is a nested block, a reference to the parent block.
Source
File: wp-includes/blocks.php
Changelog
Version | Description |
---|---|
5.9.0 | The $parent_block parameter was added. |
5.1.0 | Introduced. |