wordpress / latest / hooks / pre_render_block.html

apply_filters( 'pre_render_block', string|null $pre_render, array $parsed_block, WP_Block|null $parent_block )

Allows render_block() to be short-circuited, by returning a non-null value.

Parameters

$pre_render string|null
The pre-rendered content. Default null.
$parsed_block array
The block being rendered.
$parent_block WP_Block|null
If this is a nested block, a reference to the parent block.

Source

File: wp-includes/blocks.php. View all references

$pre_render = apply_filters( 'pre_render_block', null, $parsed_block, $parent_block );

Used By

Used By Description

Changelog

Version Description
5.9.0 The $parent_block parameter was added.
5.1.0 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_render_block