PHP Filters
lzb/block_data
Filters all available block data, which moves to the frontend for block registration.
Attributes
Name | Type | Description |
---|---|---|
$block_data | Array | all block default data |
$get_meta_value | Function | get value of the registered block meta |
Usage
PHP
function my_lzb_custom_block_meta_value( $block_data, $get_meta_value ) {
// Set value to your custom block data.
$block_data['my_custom_data'] = $get_meta_value('lazyblock_my_custom_data');
return $block_data;
}
add_filter( 'lzb/block_data', 'my_lzb_custom_block_meta_value', 10, 2 );