Make WordPress Core

Changeset 11792


Ignore:
Timestamp:
08/09/2009 10:35:28 AM (14 years ago)
Author:
westi
Message:

Pass the widget instance as context to the widget_title and widget_text filters. Fixes #10573 props Viper007Bond.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/default-widgets.php

    r11757 r11792  
    377377    function widget( $args, $instance ) {
    378378        extract($args);
    379         $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title']);
    380         $text = apply_filters( 'widget_text', $instance['text'] );
     379        $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance );
     380        $text = apply_filters( 'widget_text', $instance['text'], $instance );
    381381        echo $before_widget;
    382382        if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
Note: See TracChangeset for help on using the changeset viewer.