Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: widget_text_content

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
89                      *
90                      * By default a subset of the_content filters are applied, including wpautop and wptexturize.
91                      *
92                      * @since 4.8.0
93                      *
94                      * @param string         $text     The widget content.
95                      * @param array          $instance Array of settings for the current widget.
96                      * @param WP_Widget_Text $this     Current Text widget instance.
97                      */
98                     $text = apply_filters( 'widget_text_content', $text, $instance, $this );
99
100                } elseif ( $instance['filter'] ) {
101                     $text = wpautop( $text ); // Back-compat for instances prior to 4.8.
102                }
103           }
104
105           echo $args['before_widget'];
106           if ( ! empty( $title ) ) {
107                echo $args['before_title'] . $title . $args['after_title'];