Filters the default context provided to a rendered block.
Parameters
$contextarray
Default context.
$parsed_blockarray
{ An associative 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.}
$blockNamestring
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.
2349* @type string$innerHTMLHTML from inside block comment delimiters.2350* @type array$innerContentList of string fragments andnull markers where2351* inner blocks were found.2352*}2353* @param WP_Block|null$parent_blockIf this is a nested block, a reference to the parent block.2354*/2355$context=apply_filters('render_block_context',$context,$parsed_block,$parent_block);23562357$block=newWP_Block($parsed_block,$context);23582359return$block->render();2360}2361
History
Introduced in 5.5.0. Unchanged from 6.7.7 through 7.1.0.