wpseek.com
A WordPress-centric search engine for devs and theme authors



pre_render_block › WordPress Filter Hooks

Since5.9.0
Deprecatedn/a
apply_filters( 'pre_render_block', null, $parsed_block, $parent_block )
Parameters: (3)
  • (string|null) $pre_render The pre-rendered content. Default null.
    Required: Yes
  • (array) $parsed_block { An associative array of the block being rendered. See WP_Block_Parser_Block. @type string|null $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. }
    Required: Yes
  • (WP_Block|null) $parent_block If this is a nested block, a reference to the parent block.
    Required: Yes
Defined at:
Codex:

Allows render_block() to be short-circuited, by returning a non-null value.





Source

$pre_render = apply_filters( 'pre_render_block', null, $parsed_block, $parent_block );