apply_filters( 'render_block', string $block_content , array $block )
Filters the content of a single block.
Description
Parameters
- $block_content
-
(string) The block content about to be appended.
- $block
-
(array) The full block, including name and attributes.
Source
File: wp-includes/blocks.php
Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |
To add a div wrapper outside of some blocks (like
core/paragraph
orcore/heading
), you can add filter torender_block
:Expand full source codeCollapse full source code