Skip to:
Content

bbPress.org

Ticket #3428: 3428.diff

File 3428.diff, 1.2 KB (added by hasanuzzamanshamim, 3 years ago)

Patch created for validation

  • src/templates/default/bbpress/content-statistics.php

    diff --git a/src/templates/default/bbpress/content-statistics.php b/src/templates/default/bbpress/content-statistics.php
    index 159c0b0a..9f36494e 100644
    a b $stats = bbp_get_statistics(); ?> 
    3232                <strong><?php echo esc_html( $stats['topic_count'] ); ?></strong>
    3333        </dd>
    3434
    35         <dt><?php esc_html_e( 'Replies', 'bbpress' ); ?></dt>
    36         <dd>
    37                 <strong><?php echo esc_html( $stats['reply_count'] ); ?></strong>
    38         </dd>
     35        <?php if ( ! empty( $stats['reply_count'] ) ) : ?>
    3936
    40         <dt><?php esc_html_e( 'Topic Tags', 'bbpress' ); ?></dt>
    41         <dd>
    42                 <strong><?php echo esc_html( $stats['topic_tag_count'] ); ?></strong>
    43         </dd>
     37                <dt><?php esc_html_e( 'Replies', 'bbpress' ); ?></dt>
     38                <dd>
     39                        <strong><?php echo esc_html( $stats['reply_count'] ); ?></strong>
     40                </dd>
     41
     42        <?php endif; ?>
     43
     44        <?php if ( ! empty( $stats['topic_tag_count'] ) ) : ?>
     45
     46                <dt><?php esc_html_e( 'Topic Tags', 'bbpress' ); ?></dt>
     47                <dd>
     48                        <strong><?php echo esc_html( $stats['topic_tag_count'] ); ?></strong>
     49                </dd>
     50
     51        <?php endif; ?>
    4452
    4553        <?php if ( ! empty( $stats['empty_topic_tag_count'] ) ) : ?>
    4654