render_block WordPress Filter Hook

The render_block hook is used to render a specific Wordpress block. This hook is called when the block is being rendered, and it is passed the block object and the current post object.

apply_filters( 'render_block', string $block_content, array $block, WP_Block $instance ) #

Filters the content of a single block.


Parameters

$block_content

(string)The block content about to be appended.

$block

(array)The full block, including name and attributes.

$instance

(WP_Block)The block instance.


Top ↑

Source

File: wp-includes/class-wp-block.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.9.0The $instance parameter was added.
5.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.