WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
287 | * |
288 | * By default a subset of the_content filters are applied, including wpautop and wptexturize. |
289 | * |
290 | * @since 4.8.0 |
291 | * |
292 | * @param string $text The widget content. |
293 | * @param array $instance Array of settings for the current widget. |
294 | * @param WP_Widget_Text $widget Current Text widget instance. |
295 | */ |
296 | $text = apply_filters( 'widget_text_content', $text, $instance, $this ); |
297 | } else { |
298 | // Now in legacy mode, add paragraphs and line breaks when checkbox is checked. |
299 | if ( ! empty( $instance['filter'] ) ) { |
300 | $text = wpautop( $text ); |
301 | } |
302 |
|
303 | /* |
304 | * Manually do shortcodes on the content when the core-added filter is present. It is added by default |
305 | * in core by adding do_shortcode() to the 'widget_text_content' filter to apply after wpautop(). |