Changeset 6101 for trunk/bp-friends/bp-friends-functions.php
- Timestamp:
- 06/14/2012 08:13:13 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/bp-friends/bp-friends-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-friends/bp-friends-functions.php
r6093 r6101 171 171 172 172 function friends_get_total_friend_count( $user_id = 0 ) { 173 174 173 if ( empty( $user_id ) ) 175 174 $user_id = ( bp_displayed_user_id() ) ? bp_displayed_user_id() : bp_loggedin_user_id(); 176 175 177 if ( !$count = wp_cache_get( 'bp_total_friend_count_' . $user_id, 'bp' ) ) { 178 $count = bp_get_user_meta( $user_id, 'total_friend_count', true ); 179 if ( empty( $count ) ) $count = 0; 180 wp_cache_set( 'bp_total_friend_count_' . $user_id, $count, 'bp' ); 181 } 176 $count = bp_get_user_meta( $user_id, 'total_friend_count', true ); 177 if ( empty( $count ) ) 178 $count = 0; 182 179 183 180 return apply_filters( 'friends_get_total_friend_count', $count );
Note: See TracChangeset
for help on using the changeset viewer.