Skip to:
Content

BuddyPress.org

Changeset 2627


Ignore:
Timestamp:
02/08/2010 01:58:06 PM (14 years ago)
Author:
apeatling
Message:

Fixes #1055

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends/bp-friends-templatetags.php

    r2533 r2627  
    216216    }
    217217    add_filter( 'bp_get_total_friend_count', 'bp_core_number_format' );
    218 ?>
     218
     219function bp_friend_total_requests_count( $user_id = false ) {
     220    echo bp_friend_get_total_requests_count( $user_id );
     221}
     222    function bp_friend_get_total_requests_count( $user_id = false ) {
     223        global $bp;
     224
     225        if ( !$user_id )
     226            $user_id = $bp->loggedin_user->id;
     227
     228        return apply_filters( 'bp_friend_get_total_requests_count', (int) BP_Friends_Friendship::get_friend_user_ids( $user_id, true ) );
     229    }
     230?>
Note: See TracChangeset for help on using the changeset viewer.