render_block WordPress Filter Hook
The render_block hook is used to render a specific Wordpress block. This hook is called when the block is being rendered, and it is passed the block object and the current post object.
apply_filters( 'render_block', string $block_content , array $block , WP_Block $instance ) #
Filters the content of a single block.
Parameters
- $block_content
(string)The block content about to be appended.
- $block
(array)The full block, including name and attributes.
- $instance
(WP_Block)The block instance.
Source
Changelog
Version | Description |
---|---|
5.9.0 | The $instance parameter was added. |
5.0.0 | Introduced. |