render_block хук-фильтр . WP 5.0.0
Filters the content of a single block.
Использование
add_filter( 'render_block', 'filter_function_name_8371', 10, 2 ); function filter_function_name_8371( $block_content, $block ){ // filter... return $block_content; }
- $block_content(строка)
- The block content about to be appended.
- $block(массив)
- The full block, including name and attributes.
Список изменений
С версии 5.0.0 | Введена. |
Где вызывается хук
render_block
wp-includes/class-wp-block.php 244
return apply_filters( 'render_block', $block_content, $this->parsed_block );