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
This commit is contained in:
parent
99d17449f1
commit
b54c6b91e3
|
@ -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; } ?>
|
||||
<div class="textwidget"><?php echo $instance['filter'] ? wpautop($text) : $text; ?></div>
|
||||
|
|
Loading…
Reference in New Issue