bbp_is_user_engaged( int $user_id, int $topic_id )
Check if a user is engaged in a topic 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 engagements, otherwise false
Source Source
File: includes/users/engagements.php
function bbp_is_user_engaged( $user_id = 0, $topic_id = 0 ) { $user_id = bbp_get_user_id( $user_id, true, true ); $topic_id = bbp_get_topic_id( $topic_id ); $retval = bbp_is_object_of_user( $topic_id, $user_id, '_bbp_engagement' ); // Filter & return return (bool) apply_filters( 'bbp_is_user_engaged', $retval, $user_id, $topic_id ); }
Changelog Changelog
Version | Description |
---|---|
2.6.0 | Introduced. |