WordPress.org

Make WordPress Core

Changeset 5509


Ignore:
Timestamp:
05/22/2007 12:25:44 AM (11 years ago)
Author:
rob1n
Message:

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

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/wp-includes/widgets.php

    r5499 r5509  
    524524    $options = get_option('widget_text');
    525525    $title = $options[$number]['title'];
    526     if ( empty($title) )
    527         $title = ' ';
    528526    $text = apply_filters( 'the_content', $options[$number]['text'] );
    529527?>
    530528        <?php echo $before_widget; ?>
    531             <?php !empty( $title ) ? print($before_title . $title . $after_title) : null; ?>
     529            <?php if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
    532530            <div class="textwidget"><?php echo $text; ?></div>
    533531        <?php echo $after_widget; ?>
  • trunk/wp-includes/widgets.php

    r5499 r5509  
    524524    $options = get_option('widget_text');
    525525    $title = $options[$number]['title'];
    526     if ( empty($title) )
    527         $title = '&nbsp;';
    528526    $text = apply_filters( 'the_content', $options[$number]['text'] );
    529527?>
    530528        <?php echo $before_widget; ?>
    531             <?php !empty( $title ) ? print($before_title . $title . $after_title) : null; ?>
     529            <?php if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
    532530            <div class="textwidget"><?php echo $text; ?></div>
    533531        <?php echo $after_widget; ?>
Note: See TracChangeset for help on using the changeset viewer.