render_block_data

render_block_data

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

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('render_block_data') is found 2 times:

  • /wp-includes/blocks.php line 1675
    	 * @param array         $parsed_block The block being rendered.
    	 * @param array         $source_block An un-modified copy of $parsed_block, as it appeared in the source content.
    	 * @param WP_Block|null $parent_block If this is a nested block, a reference to the parent block.
    	 */
    	$parsed_block = apply_filters( 'render_block_data', $parsed_block, $source_block, $parent_block );
    
    	$context = array();
    
    	if ( $post instanceof WP_Post ) {
    		$context['postId'] = $post->ID;
    
    
  • /wp-includes/class-wp-block.php line 438
    					} else {
    						$source_block = $inner_block->parsed_block;
    
    						/** 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();
    					}
    

See this hook used in plugins: