Skip to:
Content

bbPress.org

Changeset 5112


Ignore:
Timestamp:
09/27/2013 07:05:53 PM (11 years ago)
Author:
johnjamesjacoby
Message:

Use empty() instead of strict 'on' comparison in topics widget. Props alex-ye. Fixes #2319. (2.4.1)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4/includes/common/widgets.php

    r5063 r5112  
    804804
    805805                // Maybe get the topic author
    806                 if ( 'on' === $settings['show_user'] ) :
     806                if ( ! empty( $settings['show_user'] ) ) :
    807807                    $author_link = bbp_get_topic_author_link( array( 'post_id' => $topic_id, 'type' => 'both', 'size' => 14 ) );
    808808                endif; ?>
     
    817817                    <?php endif; ?>
    818818
    819                     <?php if ( 'on' === $settings['show_date'] ) : ?>
     819                    <?php if ( ! empty( $settings['show_date'] ) ) : ?>
    820820
    821821                        <div><?php bbp_topic_last_active_time( $topic_id ); ?></div>
     
    11551155
    11561156                    // Only query user if showing them
    1157                     if ( 'on' === $settings['show_user'] ) :
     1157                    if ( ! empty( $settings['show_user'] ) ) :
    11581158                        $author_link = bbp_get_reply_author_link( array( 'post_id' => $reply_id, 'type' => 'both', 'size' => 14 ) );
    11591159                    else :
     
    11621162
    11631163                    // Reply author, link, and timestamp
    1164                     if ( ( 'on' === $settings['show_date'] ) && !empty( $author_link ) ) :
     1164                    if ( ! empty( $settings['show_date'] ) && !empty( $author_link ) ) :
    11651165
    11661166                        // translators: 1: reply author, 2: reply link, 3: reply timestamp
     
    11681168
    11691169                    // Reply link and timestamp
    1170                     elseif ( 'on' === $settings['show_date'] ) :
     1170                    elseif ( ! empty( $settings['show_date'] ) ) :
    11711171
    11721172                        // translators: 1: reply link, 2: reply timestamp
Note: See TracChangeset for help on using the changeset viewer.