render_block_data filter-hook . WP 5.1.0
Filters the block being rendered in render_block(), before it's processed.
Usage
add_filter( 'render_block_data', 'filter_function_name_1945', 10, 2 ); function filter_function_name_1945( $parsed_block, $source_block ){ // filter... return $parsed_block; }
- $parsed_block(array)
- The block being rendered.
- $source_block(array)
- An un-modified copy of $parsed_block, as it appeared in the source content.
Changelog
Since 5.1.0 | Introduced. |
Where the hook is called
wp-includes/blocks.php 687
$parsed_block = apply_filters( 'render_block_data', $parsed_block, $source_block );
Where in WP core the hook is used WordPress
wp-includes/blocks.php 225
add_filter( 'render_block_data', 'block_core_latest_posts_migrate_categories' );