WordPress.org

Make WordPress Core

Ticket #18595: 18595.patch

File 18595.patch, 892 bytes (added by SergeyBiryukov, 4 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 ) 
     
    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