render_block_{$this->name} WordPress Filter Hook

This hook is triggered when a block of the specified type is rendered. It allows you to modify the output of the block before it is displayed on the front-end of the site.

apply_filters( "render_block_{$this->name}", string $block_content, array $block, WP_Block $instance ) #

Filters the content of a single block.


Description

The dynamic portion of the hook name, $name, refers to the block name, e.g. "core/paragraph".


Top ↑

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