On this page
apply_filters( 'widget_text_content', string $text, array $instance, WP_Widget_Text $widget )
Filters the content of the Text widget to apply changes expected from the visual (TinyMCE) editor.
Description
By default a subset of the_content filters are applied, including wpautop and wptexturize.
Parameters
$textstring-
The widget content.
$instancearray-
Array of settings for the current widget.
$widgetWP_Widget_Text-
Current Text widget instance.
Source
File: wp-includes/widgets/class-wp-widget-text.php. View all references
$text = apply_filters( 'widget_text_content', $text, $instance, $this );
Related
Used By
| Used By | Description |
|---|---|
| WP_Widget_Text::widget() wp-includes/widgets/class-wp-widget-text.php | Outputs the content for the current Text widget instance. |
Changelog
| Version | Description |
|---|---|
| 4.8.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/widget_text_content