bp_activity_total_favorites_for_user( int $user_id )
Retrieve the number of favorite activity feed items a user has.
Description
Parameters
- $user_id
-
(Required) ID of the user whose favorite count is being requested.
Return
(int) Total favorite count for the user.
Source
File: bp-activity/bp-activity-functions.php
1356 1357 1358 1359 1360 1361 1362 1363 1364 | function bp_activity_total_favorites_for_user( $user_id = 0 ) { // Fallback on displayed user, and then logged in user. if ( empty ( $user_id ) ) { $user_id = ( bp_displayed_user_id() ) ? bp_displayed_user_id() : bp_loggedin_user_id(); } return BP_Activity_Activity::total_favorite_count( $user_id ); } |
Changelog
Version | Description |
---|---|
BuddyPress 1.2.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.