WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
фильтр не описан

widget_text_content хук-фильтр . WP 4.8.0

Filters the content of the Text widget to apply changes expected from the visual (TinyMCE) editor.

By default a subset of the_content filters are applied, including wpautop and wptexturize.


add_filter( 'widget_text_content', 'filter_function_name_9610', 10, 3 );
function filter_function_name_9610( $text, $instance, $this ){
	// filter...

	return $text;
The widget content.
Array of settings for the current widget.
Current Text widget instance.

Список изменений

С версии 4.8.0 Введена.

Где вызывается хук

wp-includes/widgets/class-wp-widget-text.php 295
$text = apply_filters( 'widget_text_content', $text, $instance, $this );

Где используется хук в ядре WP

wp-includes/class-wp-embed.php 33
add_filter( 'widget_text_content', array( $this, 'run_shortcode' ), 8 );
wp-includes/class-wp-embed.php 40
add_filter( 'widget_text_content', array( $this, 'autoembed' ), 8 );
wp-includes/default-filters.php 205
add_filter( 'widget_text_content', 'capital_P_dangit', 11 );
wp-includes/default-filters.php 206
add_filter( 'widget_text_content', 'wptexturize' );
wp-includes/default-filters.php 207
add_filter( 'widget_text_content', 'convert_smilies', 20 );
wp-includes/default-filters.php 208
add_filter( 'widget_text_content', 'wpautop' );
wp-includes/default-filters.php 209
add_filter( 'widget_text_content', 'shortcode_unautop' );
wp-includes/default-filters.php 210
add_filter( 'widget_text_content', 'do_shortcode', 11 ); // Runs after wpautop(); note that $post global will be null when shortcodes run.