From b54c6b91e32ddb101b22b7afd095b693ea6c60d8 Mon Sep 17 00:00:00 2001 From: westi Date: Sun, 9 Aug 2009 10:35:28 +0000 Subject: [PATCH] Pass the widget instance as context to the widget_title and widget_text filters. Fixes #10573 props Viper007Bond. git-svn-id: http://svn.automattic.com/wordpress/trunk@11792 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/default-widgets.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/default-widgets.php b/wp-includes/default-widgets.php index eedf4c6d26..01d8c243d5 100644 --- a/wp-includes/default-widgets.php +++ b/wp-includes/default-widgets.php @@ -376,8 +376,8 @@ class WP_Widget_Text extends WP_Widget { function widget( $args, $instance ) { extract($args); - $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title']); - $text = apply_filters( 'widget_text', $instance['text'] ); + $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance ); + $text = apply_filters( 'widget_text', $instance['text'], $instance ); echo $before_widget; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>