Get Poke Count for a User


function bp_poke_get_poke_count( $user_id ){ $pokes = bp_get_user_meta( $user_id, 'pokes', true ); if( ! empty( $pokes ) ) return count( $pokes ); return 0; }

You can pass bp_displayed_user_id() while calling this function to show the poke count of diplayed user. To show the poke count of logged in user, pass get_current_user_id()

#bp-poke #bp-hacks