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.7.2

apply_filters('render_block_data') is found 2 times:

  • /wp-includes/blocks.php line 2151
    2147
    2148
    2149
    2150
    2151
    2152
    2153
    2154
    2155
    2156
    *                                  inner blocks were found.
     * }
     * @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 512
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    } 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: