Don't show title if user leaves it blank. see #4259

git-svn-id: https://develop.svn.wordpress.org/trunk@5509 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
rob1n 2007-05-22 00:25:44 +00:00
parent f3abb87033
commit d0c8498d66
1 changed files with 1 additions and 3 deletions

View File

@ -523,12 +523,10 @@ function wp_widget_text($args, $number = 1) {
extract($args);
$options = get_option('widget_text');
$title = $options[$number]['title'];
if ( empty($title) )
$title = ' ';
$text = apply_filters( 'the_content', $options[$number]['text'] );
?>
<?php echo $before_widget; ?>
<?php !empty( $title ) ? print($before_title . $title . $after_title) : null; ?>
<?php if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
<div class="textwidget"><?php echo $text; ?></div>
<?php echo $after_widget; ?>
<?php