render_block_context

render_block_context

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.4.3

do_action('render_block_context') is found 2 times:

  • /wp-includes/blocks.php line 1480
    	 * @param array         $context      Default context.
    	 * @param array         $parsed_block Block being rendered, filtered by `render_block_data`.
    	 * @param WP_Block|null $parent_block If this is a nested block, a reference to the parent block.
    	 */
    	$context = apply_filters( 'render_block_context', $context, $parsed_block, $parent_block );
    
    	$block = new WP_Block( $parsed_block, $context );
    
    	return $block->render();
    }
    
    
  • /wp-includes/class-wp-block.php line 242
    						/** This filter is documented in wp-includes/blocks.php */
    						$inner_block->parsed_block = apply_filters( 'render_block_data', $inner_block->parsed_block, $source_block, $parent_block );
    
    						/** This filter is documented in wp-includes/blocks.php */
    						$inner_block->context = apply_filters( 'render_block_context', $inner_block->context, $inner_block->parsed_block, $parent_block );
    
    						$block_content .= $inner_block->render();
    					}
    
    					++$index;
    				}
    

See this hook used in plugins: