Skip to:
Content

bbPress.org

Changeset 6611


Ignore:
Timestamp:
07/04/2017 01:57:26 PM (7 years ago)
Author:
johnjamesjacoby
Message:

Topics: Remove bbp_get_user_closed_topic_count().

This was introduced in the 2.6 cycle to circumvent a problem from using count_user_posts(). Now that we're doing a direct query again, this function is no longer used.

See #6610.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/users/functions.php

    r6610 r6611  
    662662
    663663/**
    664  * Return the raw database count of closed topics by a user
    665  *
    666  * @since 2.6.0 bbPress (r6113)
    667  *
    668  * @param int $user_id User ID to get count for
    669  *
    670  * @return int Raw DB count of user closed topics
    671  */
    672 function bbp_get_user_closed_topic_count( $user_id = 0 ) {
    673     $user_id = bbp_get_user_id( $user_id );
    674     $bbp_db  = bbp_db();
    675     $count   = (int) $bbp_db->get_var( $bbp_db->prepare(
    676         "SELECT COUNT(*)
    677             FROM {$bbp_db->posts}
    678             WHERE post_type = %s
    679                 AND post_status = %s
    680                 AND post_author = %d",
    681         bbp_get_topic_post_type(),
    682         bbp_get_closed_status_id(),
    683         $user_id
    684     ) );
    685 
    686     // Filter & return
    687     return (int) apply_filters( 'bbp_get_user_closed_topic_count', $count, $user_id );
    688 }
    689 
    690 /**
    691664 * Bump the topic count for a user by a certain amount.
    692665 *
Note: See TracChangeset for help on using the changeset viewer.