function hook_gutenberg_block_view_BASE_BLOCK_ID_alter in Gutenberg 8.2
Provide a block plugin specific gutenberg_block_view alteration.
In this hook name, BASE_BLOCK_ID refers to the Gutenberg block's name/ID. For example, 'my-plugin/block-name' will have a BASE_BLOCK_ID of 'my_plugin_block_name'.
Parameters
array $build: A renderable array of the block.
string $block_content: The block's inner HTML.
See also
hook_gutenberg_block_view_alter()
File
- ./
gutenberg.api.php, line 132 - Documentation for Gutenberg module APIs.
Code
function hook_gutenberg_block_view_BASE_BLOCK_ID_alter(array &$build, &$block_content) {
// Add block specific pre_render hook.
$build['#pre_render'][] = 'hook_gutenberg_BASE_BLOCK_ID_pre_render';
}