Make WordPress Core

Ticket #18595: 18595.2.patch

File 18595.2.patch, 1.3 KB (added by SergeyBiryukov, 14 years ago)
  • wp-includes/default-widgets.php

     
    177177
    178178        function widget( $args, $instance ) {
    179179                extract($args);
    180                 $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
     180                $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
    181181
    182182                echo $before_widget;
    183183                if ( $title )
     
    379379                $text = apply_filters( 'widget_text', $instance['text'], $instance );
    380380                echo $before_widget;
    381381                if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
    382                         <div class="textwidget"><?php echo $instance['filter'] ? wpautop($text) : $text; ?></div>
     382                        <div class="textwidget"><?php echo !empty( $instance['filter'] ) ? wpautop($text) : $text; ?></div>
    383383                <?php
    384384                echo $after_widget;
    385385        }
     
    10641064                if ( !$nav_menu )
    10651065                        return;
    10661066
    1067                 $instance['title'] = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
     1067                $instance['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
    10681068
    10691069                echo $args['before_widget'];
    10701070