Ticket #11362: widget_title_args.diff
File widget_title_args.diff, 4.5 KB (added by , 15 years ago) |
---|
-
wp-includes/default-widgets.php
22 22 function widget( $args, $instance ) { 23 23 extract( $args ); 24 24 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); 26 26 $sortby = empty( $instance['sortby'] ) ? 'menu_order' : $instance['sortby']; 27 27 $exclude = empty( $instance['exclude'] ) ? '' : $instance['exclude']; 28 28 … … 178 178 179 179 function widget( $args, $instance ) { 180 180 extract($args); 181 $title = apply_filters('widget_title', $instance['title'] );181 $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base); 182 182 183 183 echo $before_widget; 184 184 if ( $title ) … … 223 223 extract($args); 224 224 $c = $instance['count'] ? '1' : '0'; 225 225 $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); 227 227 228 228 echo $before_widget; 229 229 if ( $title ) … … 286 286 287 287 function widget( $args, $instance ) { 288 288 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); 290 290 291 291 echo $before_widget; 292 292 if ( $title ) … … 334 334 335 335 function widget( $args, $instance ) { 336 336 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); 338 338 echo $before_widget; 339 339 if ( $title ) 340 340 echo $before_title . $title . $after_title; … … 376 376 377 377 function widget( $args, $instance ) { 378 378 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); 380 380 $text = apply_filters( 'widget_text', $instance['text'], $instance ); 381 381 echo $before_widget; 382 382 if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?> … … 426 426 function widget( $args, $instance ) { 427 427 extract( $args ); 428 428 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); 430 430 $c = $instance['count'] ? '1' : '0'; 431 431 $h = $instance['hierarchical'] ? '1' : '0'; 432 432 $d = $instance['dropdown'] ? '1' : '0'; … … 534 534 ob_start(); 535 535 extract($args); 536 536 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); 538 538 if ( !$number = (int) $instance['number'] ) 539 539 $number = 10; 540 540 else if ( $number < 1 ) … … 625 625 global $wpdb, $comments, $comment; 626 626 627 627 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); 629 629 if ( !$number = (int) $instance['number'] ) 630 630 $number = 5; 631 631 else if ( $number < 1 ) … … 721 721 if ( empty($title) ) 722 722 $title = empty($desc) ? __('Unknown Feed') : $desc; 723 723 724 $title = apply_filters('widget_title', $title 724 $title = apply_filters('widget_title', $title, $instance, $this->id_base); 725 725 $url = esc_url(strip_tags($url)); 726 726 $icon = includes_url('images/rss.png'); 727 727 if ( $title ) … … 974 974 975 975 function widget( $args, $instance ) { 976 976 extract($args); 977 $title = apply_filters('widget_title', empty($instance['title']) ? __('Tags') : $instance['title'] );977 $title = apply_filters('widget_title', empty($instance['title']) ? __('Tags') : $instance['title'], $instance, $this->id_base); 978 978 979 979 echo $before_widget; 980 980 if ( $title )