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.
blockNamestring|nullName of block.attrsarrayAttributes from block comment delimiters.innerBlocksarray[]List of inner blocks. An array of arrays that have the same structure as this one.innerHTMLstringHTML from inside block comment delimiters.innerContentarrayList 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.
Source
$context = apply_filters( 'render_block_context', $context, $parsed_block, $parent_block );
You can conditionally and also dynamically define context for a particular block: