bbp_is_user_favorite( int $user_id, int $topic_id )
Check if a topic is in user’s favorites or not
Description Description
Parameters Parameters
- $user_id
-
(Optional) User id
- $topic_id
-
(Optional) Topic id
Return Return
(bool) True if the topic is in user's favorites, otherwise false
Source Source
File: includes/users/engagements.php
function bbp_is_user_favorite( $user_id = 0, $topic_id = 0 ) { $retval = bbp_is_object_of_user( $topic_id, $user_id, '_bbp_favorite' ); // Filter & return return (bool) apply_filters( 'bbp_is_user_favorite', $retval, $user_id, $topic_id ); }
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |