Ticket #24605: 24605.diff
File 24605.diff, 1.3 KB (added by , 9 years ago) |
---|
-
src/wp-includes/widgets/class-wp-widget-text.php
30 30 /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ 31 31 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); 32 32 33 $widget_text = ! empty( $instance['text'] ) ? $instance['text'] : ''; 34 33 35 /** 34 36 * Filter the content of the Text widget. 35 37 * 36 38 * @since 2.3.0 39 * @since 4.4.0 Added the `$this` parameter. 37 40 * 38 * @param string $widget_text The widget content. 39 * @param WP_Widget $instance WP_Widget instance. 41 * @param string $widget_text The widget content. 42 * @param array $instance Array of settings for the current widget. 43 * @param WP_Widget_Text $this Current Text widget instance. 40 44 */ 41 $text = apply_filters( 'widget_text', empty( $instance['text'] ) ? '' : $instance['text'], $instance ); 45 $text = apply_filters( 'widget_text', $widget_text, $instance, $this ); 46 42 47 echo $args['before_widget']; 43 48 if ( ! empty( $title ) ) { 44 49 echo $args['before_title'] . $title . $args['after_title'];