diff --git a/wp-includes/version.php b/wp-includes/version.php index eeba707044..62f8569e47 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34551'; +$wp_version = '4.4-alpha-34552'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets/class-wp-widget-text.php b/wp-includes/widgets/class-wp-widget-text.php index 962e5ed6d1..859b4ecdf1 100644 --- a/wp-includes/widgets/class-wp-widget-text.php +++ b/wp-includes/widgets/class-wp-widget-text.php @@ -30,15 +30,20 @@ class WP_Widget_Text extends WP_Widget { /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); + $widget_text = ! empty( $instance['text'] ) ? $instance['text'] : ''; + /** * Filter the content of the Text widget. * * @since 2.3.0 + * @since 4.4.0 Added the `$this` parameter. * - * @param string $widget_text The widget content. - * @param WP_Widget $instance WP_Widget instance. + * @param string $widget_text The widget content. + * @param array $instance Array of settings for the current widget. + * @param WP_Widget_Text $this Current Text widget instance. */ - $text = apply_filters( 'widget_text', empty( $instance['text'] ) ? '' : $instance['text'], $instance ); + $text = apply_filters( 'widget_text', $widget_text, $instance, $this ); + echo $args['before_widget']; if ( ! empty( $title ) ) { echo $args['before_title'] . $title . $args['after_title'];