Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/21/2011 02:14:16 PM (15 years ago)
Author:
boonebgorges
Message:

Fixes sticky logic on group forum directories so that stickies always appear at the top of the order, without breaking pagination. Fixes #3059. Props sushkov for the inital patch. Introduces bp_forums_enable_global_directory_stickies() to allow easy modification of the default global forum directory behavior, which is to show group stickies in their normal freshness-based position.

File:
1 edited

Legend:

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

    r4684 r4764  
    245245}
    246246
    247 
    248247function groups_total_public_forum_topic_count( $type = 'newest' ) {
    249248    return apply_filters( 'groups_total_public_forum_topic_count', BP_Groups_Group::get_global_forum_topic_count( $type ) );
    250249}
    251250
     251/**
     252 * Get a total count of all topics of a given status, across groups/forums
     253 *
     254 * @package BuddyPress
     255 * @since 1.3
     256 *
     257 * @param str $status 'public', 'private', 'hidden', 'all' Which group types to count
     258 * @return int The topic count
     259 */
     260function groups_total_forum_topic_count( $status = 'public' ) {
     261    return apply_filters( 'groups_total_forum_topic_count', BP_Groups_Group::get_global_topic_count( $status ) );
     262}
     263
    252264?>
Note: See TracChangeset for help on using the changeset viewer.