bp_get_activity_is_favorite()
Return whether the current activity is in a current user’s favorites.
Description Description
Return Return
(bool) True if user favorite, false otherwise.
Source Source
File: bp-activity/bp-activity-template.php
function bp_get_activity_is_favorite() { global $activities_template; /** * Filters whether the current activity item is in the current user's favorites. * * @since 1.2.0 * * @param bool $value Whether or not the current activity item is in the current user's favorites. */ return (bool) apply_filters( 'bp_get_activity_is_favorite', in_array( $activities_template->activity->id, (array) $activities_template->my_favs ) ); }
Changelog Changelog
Version | Description |
---|---|
1.2.0 | Introduced. |