WordPress.org

Make WordPress Core

Changeset 13248


Ignore:
Timestamp:
02/20/10 11:56:00 (6 years ago)
Author:
nacin
Message:

Always pass widget instance to widget_title filter. Also add widget type, props scribu, fixes #11362

File:
1 edited

Legend:

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

    r13068 r13248  
    2323        extract( $args ); 
    2424 
    25         $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'Pages' ) : $instance['title']); 
     25        $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'Pages' ) : $instance['title'], $instance, $this->id_base); 
    2626        $sortby = empty( $instance['sortby'] ) ? 'menu_order' : $instance['sortby']; 
    2727        $exclude = empty( $instance['exclude'] ) ? '' : $instance['exclude']; 
     
    179179    function widget( $args, $instance ) { 
    180180        extract($args); 
    181         $title = apply_filters('widget_title', $instance['title']); 
     181        $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base); 
    182182 
    183183        echo $before_widget; 
     
    224224        $c = $instance['count'] ? '1' : '0'; 
    225225        $d = $instance['dropdown'] ? '1' : '0'; 
    226         $title = apply_filters('widget_title', empty($instance['title']) ? __('Archives') : $instance['title']); 
     226        $title = apply_filters('widget_title', empty($instance['title']) ? __('Archives') : $instance['title'], $instance, $this->id_base); 
    227227 
    228228        echo $before_widget; 
     
    287287    function widget( $args, $instance ) { 
    288288        extract($args); 
    289         $title = apply_filters('widget_title', empty($instance['title']) ? __('Meta') : $instance['title']); 
     289        $title = apply_filters('widget_title', empty($instance['title']) ? __('Meta') : $instance['title'], $instance, $this->id_base); 
    290290 
    291291        echo $before_widget; 
     
    335335    function widget( $args, $instance ) { 
    336336        extract($args); 
    337         $title = apply_filters('widget_title', empty($instance['title']) ? ' ' : $instance['title']); 
     337        $title = apply_filters('widget_title', empty($instance['title']) ? ' ' : $instance['title'], $instance, $this->id_base); 
    338338        echo $before_widget; 
    339339        if ( $title ) 
     
    377377    function widget( $args, $instance ) { 
    378378        extract($args); 
    379         $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance ); 
     379        $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); 
    380380        $text = apply_filters( 'widget_text', $instance['text'], $instance ); 
    381381        echo $before_widget; 
     
    427427        extract( $args ); 
    428428 
    429         $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title']); 
     429        $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title'], $instance, $this->id_base); 
    430430        $c = $instance['count'] ? '1' : '0'; 
    431431        $h = $instance['hierarchical'] ? '1' : '0'; 
     
    535535        extract($args); 
    536536 
    537         $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Posts') : $instance['title']); 
     537        $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Posts') : $instance['title'], $instance, $this->id_base); 
    538538        if ( !$number = (int) $instance['number'] ) 
    539539            $number = 10; 
     
    626626 
    627627        extract($args, EXTR_SKIP); 
    628         $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Comments') : $instance['title']); 
     628        $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Comments') : $instance['title'], $instance, $this->id_base); 
    629629        if ( !$number = (int) $instance['number'] ) 
    630630            $number = 5; 
     
    722722            $title = empty($desc) ? __('Unknown Feed') : $desc; 
    723723 
    724         $title = apply_filters('widget_title', $title ); 
     724        $title = apply_filters('widget_title', $title, $instance, $this->id_base); 
    725725        $url = esc_url(strip_tags($url)); 
    726726        $icon = includes_url('images/rss.png'); 
     
    977977    function widget( $args, $instance ) { 
    978978        extract($args); 
    979         $title = apply_filters('widget_title', empty($instance['title']) ? __('Tags') : $instance['title']); 
     979        $title = apply_filters('widget_title', empty($instance['title']) ? __('Tags') : $instance['title'], $instance, $this->id_base); 
    980980 
    981981        echo $before_widget; 
Note: See TracChangeset for help on using the changeset viewer.