render_block_data хук-фильтр . WP 5.1.0
Filters the block being rendered in render_block(), before it's processed.
Использование
add_filter( 'render_block_data', 'filter_function_name_4908', 10, 2 ); function filter_function_name_4908( $block, $source_block ){ // filter... return $block; }
- $block(массив)
- The block being rendered.
- $source_block(массив)
- An un-modified copy of $block, as it appeared in the source content.
Список изменений
С версии 5.1.0 | Введена. |
Где вызывается хук
wp-includes/blocks.php 246
$block = apply_filters( 'render_block_data', $block, $source_block );