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

do_action('render_block_context') is found 2 times:

  • /wp-includes/blocks.php line 2187
    2183
    2184
    2185
    2186
    2187
    2188
    2189
    2190
    2191
    2192
         *                                  inner blocks were found.
         * }
         * @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 515
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
            /** 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: