Filters the block being rendered in render_block(), before it's processed.
Parameters
$parsed_blockarray
{ 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.}
$blockNamestring|null
Name of block.
$attrsarray
Attributes from block comment delimiters.
$innerBlocksarray[]
List of inner blocks. An array of arrays that have the same structure as this one.
$innerHTMLstring
HTML from inside block comment delimiters.
$innerContentarray
List of string fragments and null markers where inner blocks were found.
$source_blockarray
{ An un-modified copy of $parsed_block, as it appeared in the source content. 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.}
$blockNamestring|null
Name of block.
$attrsarray
Attributes from block comment delimiters.
$innerBlocksarray[]
List of inner blocks. An array of arrays that have the same structure as this one.
$innerHTMLstring
HTML from inside block comment delimiters.
$innerContentarray
List of string fragments and null markers where inner blocks were found.
$parent_blockWP_Block|null
If this is a nested block, a reference to the parent block.
2337* @type string$innerHTMLHTML from inside block comment delimiters.2338* @type array$innerContentList of string fragments andnull markers where2339* inner blocks were found.2340*}2341* @param WP_Block|null$parent_blockIf this is a nested block, a reference to the parent block.2342*/2343$parsed_block=apply_filters('render_block_data',$parsed_block,$source_block,$parent_block);23442345$context=array();23462347if($postinstanceofWP_Post){2348$context['postId']=$post->ID;2349
History
Introduced in 5.1.0. Unchanged from 6.7.7 through 7.1.0.