render_block filter-hook . WP 5.0.0
Filters the content of a single block.
Usage
add_filter( 'render_block', 'filter_function_name_2700', 10, 2 ); function filter_function_name_2700( $block_content, $block ){ // filter... return $block_content; }
- $block_content(string)
- The block content about to be appended.
- $block(array)
- The full block, including name and attributes.
Changelog
Since 5.0.0 | Introduced. |
Where the hook is called
render_block
wp-includes/class-wp-block.php 244
return apply_filters( 'render_block', $block_content, $this->parsed_block );