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

git-svn-id: http://svn.automattic.com/wordpress/trunk@5509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rob1n 2007-05-22 00:25:44 +00:00
parent 3fab6618e2
commit 3ed5b0a01e
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