Filter hook 'pre_render_block'
in WP Core File wp-includes/blocks.php at line 1983
Description
Allows render_block() to be short-circuited, by returning a non-null value. have the same structure as this one. inner blocks were found. }
Occurrences
Filename |
Line Number |
wp-includes/blocks.php |
1983 |
wp-includes/class-wp-block.php |
486 |
Parameters
Type |
Name |
Description |
string|null |
$pre_render |
The pre-rendered content. Default null. |
array |
$parsed_block |
{ A representative array of the block being rendered. See WP_Block_Parser_Block. |
WP_Block|null |
$parent_block |
If this is a nested block, a reference to the parent block. |
PHP Doc
/**
* Allows render_block() to be short-circuited, by returning a non-null value.
*
* @since 5.1.0
* @since 5.9.0 The `$parent_block` parameter was added.
*
* @param string|null $pre_render The pre-rendered content. Default null.
* @param array $parsed_block {
* A representative array of the block being rendered. See WP_Block_Parser_Block.
*
* @type string $blockName Name of block.
* @type array $attrs Attributes from block comment delimiters.
* @type array[] $innerBlocks List of inner blocks. An array of arrays that
* have the same structure as this one.
* @type string $innerHTML HTML from inside block comment delimiters.
* @type array $innerContent List of string fragments and null markers where
* inner blocks were found.
* }
* @param WP_Block|null $parent_block If this is a nested block, a reference to the parent block.
*/