Skip to:
Content

BuddyPress.org

Changeset 6241


Ignore:
Timestamp:
08/07/2012 06:25:03 PM (12 years ago)
Author:
djpaul
Message:

Remove get_global_forum_topic_count_extra_sql filter from get_global_forum_topic_count().

This is done because the filter 'groups_total_public_forum_topic_count'
is used in both groups_total_public_forum_topic_count() and in
get_global_forum_topic_count(). Removing it from the latter per
discussion on #4306 to review

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-classes.php

    r6153 r6241  
    646646            $bp->groups->filter_sql = ' AND t.topic_posts = 1';
    647647
    648         /**
    649          * Provide backward-compatibility for the groups_total_public_forum_topic_count SQL filter.
    650          * Developers: DO NOT use this filter. It will be removed in BP 1.7. Instead, use
    651          * get_global_forum_topic_count_extra_sql. See https://buddypress.trac.wordpress.org/ticket/4306
    652          */
    653         $maybe_extra_sql = apply_filters( 'groups_total_public_forum_topic_count', $bp->groups->filter_sql, $type );
    654 
    655         if ( is_int( $maybe_extra_sql ) )
    656             $extra_sql = $bp->groups->filter_sql;
    657         else
    658             $extra_sql = $maybe_extra_sql;
    659 
    660         // Developers: use this filter instead
     648        // https://buddypress.trac.wordpress.org/ticket/4306
    661649        $extra_sql = apply_filters( 'get_global_forum_topic_count_extra_sql', $bp->groups->filter_sql, $type );
    662650
Note: See TracChangeset for help on using the changeset viewer.