Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: widget_text

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
271            *
272            * @since 2.3.0
273            * @since 4.4.0 Added the `$widget` parameter.
274            * @since 4.8.1 The `$widget` param may now be a `WP_Widget_Custom_HTML` object in addition to a `WP_Widget_Text` object.
275            *
276            * @param string                               $text     The widget content.
277            * @param array                                $instance Array of settings for the current widget.
278            * @param WP_Widget_Text|WP_Widget_Custom_HTML $widget   Current text or HTML widget instance.
279            */
280           $text = apply_filters( 'widget_text', $text, $instance, $this );
281
282           if ( $is_visual_text_widget ) {
283
284                /**
285                 * Filters the content of the Text widget to apply changes expected from the visual (TinyMCE) editor.
286                 *
287                 * By default a subset of the_content filters are applied, including wpautop and wptexturize.
288                 *
289                 * @since 4.8.0