PHP Filters
lzb/block_render/output
Filters block output string.
Attributes
Name | Type | Description |
---|---|---|
$result | String | block output string |
$attributes | Array | block attributes |
$context | String | rendering context [editor , frontend ] |
Additional Filters
Name | Description |
---|---|
lazyblock/BLOCK_SLUG/frontend_output | specific block in the frontend only |
lazyblock/BLOCK_SLUG/editor_output | specific block in the editor only |
lazyblock/BLOCK_SLUG/output | specific block only |
Usage
PHP
function my_lzb_block_render_output( $result, $attributes, $context ) {
// Custom output for all blocks
return '<p>Custom Paragraph</p>' . $result;
}
add_filter( 'lzb/block_render/output', 'my_lzb_block_render_output', 10, 3 );
PHP
function my_lzb_block_render_output( $result, $attributes, $context ) {
// Custom output for block "lazyblock/my-custom-block"
return '<p>Custom Paragraph</p>' . $result;
}
add_filter( 'lazyblock/my-custom-block/output', 'my_lzb_block_render_output', 10, 3 );
Previous Articlelzb/block_render/allow_inner_blocks_wrapperNext Articlelzb/block_render/include_template