예제 #1
0
/**
 * Return the revision count of the topic
 *
 * @since 2.0.0 bbPress (r2782)
 *
 * @param int $topic_id Optional. Topic id
 * @uses bbp_get_topic_revisions() To get the topic revisions
 * @uses apply_filters() Calls 'bbp_get_topic_revision_count'
 *                        with the revision count and topic id
 * @return string Topic revision count
 */
function bbp_get_topic_revision_count($topic_id = 0, $integer = false)
{
    $count = (int) count(bbp_get_topic_revisions($topic_id));
    $filter = true === $integer ? 'bbp_get_topic_revision_count_int' : 'bbp_get_topic_revision_count';
    return apply_filters($filter, $count, $topic_id);
}
예제 #2
0
/**
 * Return the revision count of the topic
 *
 * @since bbPress (r2782)
 *
 * @param int $topic_id Optional. Topic id
 * @uses bbp_get_topic_revisions() To get the topic revisions
 * @uses apply_filters() Calls 'bbp_get_topic_revision_count'
 *                        with the revision count and topic id
 * @return string Topic revision count
 */
function bbp_get_topic_revision_count($topic_id = 0)
{
    return apply_filters('bbp_get_topic_revisions', count(bbp_get_topic_revisions($topic_id)), $topic_id);
}