Filters the content of the Block widget before output.
Parameters
$contentstring- The widget content.
$instancearray- Array of settings for the current widget.
$widgetWP_Widget_Block- Current Block widget instance.
Source
echo apply_filters(
'widget_block_content',
$instance['content'],
$instance,
$this
);
Changelog
| Version | Description |
|---|---|
| 5.8.0 | Introduced. |
Really useful if, for example, we want to translate a piece of text (or change HTML code).
Example: