Skip to:
Content

bbPress.org

Ticket #3611: hidden-count-fix.patch

File hidden-count-fix.patch, 784 bytes (added by SirLouen, 8 months ago)

Fix for Hiddent Topic Count

  • src/includes/forums/template.php

    diff --git src/includes/forums/template.php src/includes/forums/template.php
    index 70bc444f..a9eefdca 100644
    function bbp_forum_topic_count_hidden( $forum_id = 0, $total_count = true, $inte 
    13561356         */
    13571357        function bbp_get_forum_topic_count_hidden( $forum_id = 0, $total_count = true, $integer = null ) {
    13581358                $forum_id = bbp_get_forum_id( $forum_id );
    1359                 $meta_key = empty( $total_count ) ? '_bbp_topic_count_hidden' : '_bbp_topic_reply_count_hidden';
     1359                $meta_key = ( ! $total_count ) ? '_bbp_topic_count_hidden' : '_bbp_total_topic_count_hidden';
    13601360                $topics   = (int) get_post_meta( $forum_id, $meta_key, true );
    13611361                $filter   = ( true === $integer )
    13621362                        ? 'bbp_get_forum_topic_count_hidden_int'