From 599246431bda3e32166a8ad8a168f08ef269f687 Mon Sep 17 00:00:00 2001 From: Peter Westwood 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: https://develop.svn.wordpress.org/trunk@11792 602fd350-edb4-49c9-b593-d223f7449a82 --- 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; } ?>