Improved the widget title

This commit is contained in:
Claudio Sanches 2015-01-02 11:05:06 -02:00
parent 37ea5ee65a
commit b4cc3cfcd5
1 changed files with 1 additions and 2 deletions

View File

@ -112,8 +112,7 @@ abstract class WC_Widget extends WP_Widget {
public function widget_start( $args, $instance ) {
echo $args['before_widget'];
$default = isset( $this->settings['title']['std'] ) ? $this->settings['title']['std'] : '';
if ( $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? $default : $instance['title'], $instance, $this->id_base ) ) {
if ( $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ) ) {
echo $args['before_title'] . $title . $args['after_title'];
}
}