Ticket #39909: 39909.patch
File 39909.patch, 9.9 KB (added by , 8 years ago) |
---|
-
wp-includes/widgets/class-wp-nav-menu-widget.php
41 41 * @param array $instance Settings for the current Custom Menu widget instance. 42 42 */ 43 43 public function widget( $args, $instance ) { 44 if ( empty( $instance['title'] ) ) { 45 $instance['title'] = $this->name; 46 } 47 44 48 // Get menu 45 49 $nav_menu = ! empty( $instance['nav_menu'] ) ? wp_get_nav_menu_object( $instance['nav_menu'] ) : false; 46 50 … … 48 52 return; 49 53 50 54 /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ 51 $instance['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' :$instance['title'], $instance, $this->id_base );55 $instance['title'] = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ); 52 56 53 57 echo $args['before_widget']; 54 58 -
wp-includes/widgets/class-wp-widget-archives.php
42 42 * @param array $instance Settings for the current Archives widget instance. 43 43 */ 44 44 public function widget( $args, $instance ) { 45 if ( empty( $instance['title'] ) ) { 46 $instance['title'] = $this->name; 47 } 48 45 49 $c = ! empty( $instance['count'] ) ? '1' : '0'; 46 50 $d = ! empty( $instance['dropdown'] ) ? '1' : '0'; 47 51 48 52 /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ 49 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Archives' ) :$instance['title'], $instance, $this->id_base );53 $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ); 50 54 51 55 echo $args['before_widget']; 52 56 if ( $title ) { -
wp-includes/widgets/class-wp-widget-calendar.php
52 52 * @param array $instance The settings for the particular instance of the widget. 53 53 */ 54 54 public function widget( $args, $instance ) { 55 if ( empty( $instance['title'] ) ) { 56 $instance['title'] = $this->name; 57 } 58 55 59 /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ 56 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' :$instance['title'], $instance, $this->id_base );60 $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ); 57 61 58 62 echo $args['before_widget']; 59 63 if ( $title ) { -
wp-includes/widgets/class-wp-widget-categories.php
42 42 * @param array $instance Settings for the current Categories widget instance. 43 43 */ 44 44 public function widget( $args, $instance ) { 45 if ( empty( $instance['title'] ) ) { 46 $instance['title'] = $this->name; 47 } 48 45 49 static $first_dropdown = true; 46 50 47 51 /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ 48 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Categories' ) :$instance['title'], $instance, $this->id_base );52 $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ); 49 53 50 54 $c = ! empty( $instance['count'] ) ? '1' : '0'; 51 55 $h = ! empty( $instance['hierarchical'] ) ? '1' : '0'; -
wp-includes/widgets/class-wp-widget-meta.php
44 44 * @param array $instance Settings for the current Meta widget instance. 45 45 */ 46 46 public function widget( $args, $instance ) { 47 if ( empty( $instance['title'] ) ) { 48 $instance['title'] = $this->name; 49 } 50 47 51 /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ 48 $title = apply_filters( 'widget_title', empty($instance['title']) ? __( 'Meta' ) :$instance['title'], $instance, $this->id_base );52 $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ); 49 53 50 54 echo $args['before_widget']; 51 55 if ( $title ) { -
wp-includes/widgets/class-wp-widget-pages.php
42 42 * @param array $instance Settings for the current Pages widget instance. 43 43 */ 44 44 public function widget( $args, $instance ) { 45 if ( empty( $instance['title'] ) ) { 46 $instance['title'] = $this->name; 47 } 45 48 46 49 /** 47 50 * Filters the widget title. … … 52 55 * @param array $instance An array of the widget's settings. 53 56 * @param mixed $id_base The widget ID. 54 57 */ 55 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Pages' ) :$instance['title'], $instance, $this->id_base );58 $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ); 56 59 57 60 $sortby = empty( $instance['sortby'] ) ? 'menu_order' : $instance['sortby']; 58 61 $exclude = empty( $instance['exclude'] ) ? '' : $instance['exclude']; -
wp-includes/widgets/class-wp-widget-recent-comments.php
70 70 * @param array $instance Settings for the current Recent Comments widget instance. 71 71 */ 72 72 public function widget( $args, $instance ) { 73 if ( empty( $instance['title'] ) ) { 74 $instance['title'] = $this->name; 75 } 76 73 77 if ( ! isset( $args['widget_id'] ) ) 74 78 $args['widget_id'] = $this->id; 75 79 76 80 $output = ''; 77 81 78 $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Comments' );79 80 82 /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ 81 $title = apply_filters( 'widget_title', $ title, $instance, $this->id_base );83 $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ); 82 84 83 85 $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5; 84 86 if ( ! $number ) -
wp-includes/widgets/class-wp-widget-recent-posts.php
43 43 * @param array $instance Settings for the current Recent Posts widget instance. 44 44 */ 45 45 public function widget( $args, $instance ) { 46 if ( empty( $instance['title'] ) ) { 47 $instance['title'] = $this->name; 48 } 49 46 50 if ( ! isset( $args['widget_id'] ) ) { 47 51 $args['widget_id'] = $this->id; 48 52 } 49 53 50 $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Posts' );51 52 54 /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ 53 $title = apply_filters( 'widget_title', $ title, $instance, $this->id_base );55 $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ); 54 56 55 57 $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5; 56 58 if ( ! $number ) -
wp-includes/widgets/class-wp-widget-rss.php
45 45 if ( isset($instance['error']) && $instance['error'] ) 46 46 return; 47 47 48 if ( empty( $instance['title'] ) ) { 49 $instance['title'] = $this->name; 50 } 51 48 52 $url = ! empty( $instance['url'] ) ? $instance['url'] : ''; 49 53 while ( stristr($url, 'http') != $url ) 50 54 $url = substr($url, 1); -
wp-includes/widgets/class-wp-widget-search.php
42 42 * @param array $instance Settings for the current Search widget instance. 43 43 */ 44 44 public function widget( $args, $instance ) { 45 if ( empty( $instance['title'] ) ) { 46 $instance['title'] = $this->name; 47 } 48 45 49 /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ 46 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' :$instance['title'], $instance, $this->id_base );50 $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ); 47 51 48 52 echo $args['before_widget']; 49 53 if ( $title ) { -
wp-includes/widgets/class-wp-widget-text.php
43 43 * @param array $instance Settings for the current Text widget instance. 44 44 */ 45 45 public function widget( $args, $instance ) { 46 if ( empty( $instance['title'] ) ) { 47 $instance['title'] = $this->name; 48 } 46 49 47 50 /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ 48 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' :$instance['title'], $instance, $this->id_base );51 $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ); 49 52 50 53 $widget_text = ! empty( $instance['text'] ) ? $instance['text'] : ''; 51 54