Skip to:
Content

bbPress.org

Ticket #2411: pj-bbpress-widgets-flags-fix.diff

File pj-bbpress-widgets-flags-fix.diff, 2.0 KB (added by inderpreet99, 11 years ago)

patch

  • includes/common/widgets.php

    diff --git a/includes/common/widgets.php b/includes/common/widgets.php
    index a013ff9..8baedc3 100644
    a b  
    803803                                $author_link = '';
    804804
    805805                                // Maybe get the topic author
    806                                 if ( 'on' === $settings['show_user'] ) :
     806                                if ( true === $settings['show_user'] ) :
    807807                                        $author_link = bbp_get_topic_author_link( array( 'post_id' => $topic_id, 'type' => 'both', 'size' => 14 ) );
    808808                                endif; ?>
    809809
     
    816816
    817817                                        <?php endif; ?>
    818818
    819                                         <?php if ( 'on' === $settings['show_date'] ) : ?>
     819                                        <?php if ( true === $settings['show_date'] ) : ?>
    820820
    821821                                                <div><?php bbp_topic_last_active_time( $topic_id ); ?></div>
    822822
     
    11541154                                        $reply_link = '<a class="bbp-reply-topic-title" href="' . esc_url( bbp_get_reply_url( $reply_id ) ) . '" title="' . esc_attr( bbp_get_reply_excerpt( $reply_id, 50 ) ) . '">' . bbp_get_reply_topic_title( $reply_id ) . '</a>';
    11551155
    11561156                                        // Only query user if showing them
    1157                                         if ( 'on' === $settings['show_user'] ) :
     1157                                        if ( true === $settings['show_user'] ) :
    11581158                                                $author_link = bbp_get_reply_author_link( array( 'post_id' => $reply_id, 'type' => 'both', 'size' => 14 ) );
    11591159                                        else :
    11601160                                                $author_link = false;
    11611161                                        endif;
    11621162
    11631163                                        // Reply author, link, and timestamp
    1164                                         if ( ( 'on' === $settings['show_date'] ) && !empty( $author_link ) ) :
     1164                                        if ( ( true === $settings['show_date'] ) && !empty( $author_link ) ) :
    11651165
    11661166                                                // translators: 1: reply author, 2: reply link, 3: reply timestamp
    11671167                                                printf( _x( '%1$s on %2$s %3$s', 'widgets', 'bbpress' ), $author_link, $reply_link, '<div>' . bbp_get_time_since( get_the_time( 'U' ) ) . '</div>' );
    11681168
    11691169                                        // Reply link and timestamp
    1170                                         elseif ( 'on' === $settings['show_date'] ) :
     1170                                        elseif ( true === $settings['show_date'] ) :
    11711171
    11721172                                                // translators: 1: reply link, 2: reply timestamp
    11731173                                                printf( _x( '%1$s %2$s',         'widgets', 'bbpress' ), $reply_link,  '<div>' . bbp_get_time_since( get_the_time( 'U' ) ) . '</div>'              );