widget_block_content WordPress Filter Hook

The widget_block_content hook is used to filter the content of a widget before it is displayed. This hook can be used to add custom content to a widget, or to remove certain elements from the widget content.

apply_filters( 'widget_block_content', string $content, array $instance, WP_Widget_Block $widget ) #

Filters the content of the Block widget before output.


Parameters

$content

(string)The widget content.

$instance

(array)Array of settings for the current widget.

$widget

(WP_Widget_Block)Current Block widget instance.


Top ↑

Source

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

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.8.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.