[ Index ] |
PHP Cross Reference of BBPress |
[Source view] [Print] [Project Stats]
bbPress User Engagement Functions
File Size: | 1229 lines (37 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
bbp_add_user_to_object( $object_id = 0, $user_id = 0, $rel_key = '', $rel_type = 'post', $unique = false ) X-Ref |
Add a user id to an object return: bool Returns true on success, false on failure since: 2.6.0 bbPress (r6109) param: int $object_id The object id param: int $user_id The user id param: string $rel_key The relationship key param: string $rel_type The relationship type (usually 'post') param: bool $unique Whether meta key should be unique to the object |
bbp_remove_user_from_object( $object_id = 0, $user_id = 0, $rel_key = '', $rel_type = 'post' ) X-Ref |
Remove a user id from an object return: bool Returns true on success, false on failure since: 2.6.0 bbPress (r6109) param: int $object_id The object id param: int $user_id The user id param: string $rel_key The relationship key param: string $rel_type The relationship type (usually 'post') |
bbp_remove_user_from_all_objects( $user_id = 0, $rel_key = '', $rel_type = 'post' ) X-Ref |
Remove a user id from all objects return: bool Returns true on success, false on failure since: 2.6.0 bbPress (r6109) param: int $user_id The user id param: string $rel_key The relationship key param: string $rel_type The relationship type (usually 'post') |
bbp_remove_object_from_all_users( $object_id = 0, $rel_key = '', $rel_type = 'post' ) X-Ref |
Remove an object from all users return: bool Returns true on success, false on failure since: 2.6.0 bbPress (r6109) param: int $object_id The object id param: int $user_id The user id param: string $rel_key The relationship key param: string $rel_type The relationship type (usually 'post') |
bbp_remove_all_users_from_all_objects( $rel_key = '', $rel_type = 'post' ) X-Ref |
Remove all users from all objects return: bool Returns true on success, false on failure since: 2.6.0 bbPress (r6109) param: string $rel_key The relationship key param: string $rel_type The relationship type (usually 'post') |
bbp_get_users_for_object( $object_id = 0, $rel_key = '', $rel_type = 'post' ) X-Ref |
Get users of an object return: array Returns ids of users since: 2.6.0 bbPress (r6109) param: int $object_id The object id param: string $rel_key The key used to index this relationship param: string $rel_type The type of meta to look in |
bbp_is_object_of_user( $object_id = 0, $user_id = 0, $rel_key = '', $rel_type = 'post' ) X-Ref |
Check if an object has a specific user return: bool Returns true if object has a user, false if not since: 2.6.0 bbPress (r6109) param: int $object_id The object id param: int $user_id The user id param: string $rel_key The relationship key param: string $rel_type The relationship type (usually 'post') |
bbp_get_user_object_query( $args = array() X-Ref |
Get the query part responsible for JOINing objects to user IDs return: array since: 2.6.0 bbPress (r6747) param: array $args Default query arguments param: string $context Additional context param: string $rel_key The relationship key param: string $rel_type The relationship type (usually 'post') |
bbp_get_topic_engagements( $topic_id = 0 ) X-Ref |
Get the users who have engaged in a topic return: array|bool Results if the topic has any engagements, otherwise false since: 2.6.0 bbPress (r6320) param: int $topic_id Optional. Topic id |
bbp_get_topic_engagements_raw( $topic_id = 0 ) X-Ref |
Return the users who have engaged in a topic, directly with a database query See: https://bbpress.trac.wordpress.org/ticket/3083 return: array since: 2.6.0 bbPress (r6522) param: int $topic_id |
bbp_get_user_engagements( $args = array() X-Ref |
Get a user's topic engagements return: bool True if user has engaged, otherwise false since: 2.6.0 bbPress (r6320) since: 2.6.0 bbPress (r6618) Signature changed to accept an array of arguments param: array $args Optional. Arguments to pass into bbp_has_replies() |
bbp_is_user_engaged( $user_id = 0, $topic_id = 0 ) X-Ref |
Check if a user is engaged in a topic or not return: bool True if the topic is in user's engagements, otherwise false since: 2.6.0 bbPress (r6320) param: int $user_id Optional. User id param: int $topic_id Optional. Topic id |
bbp_add_user_engagement( $user_id = 0, $topic_id = 0 ) X-Ref |
Add a topic to user's engagements Note that both the User and Topic should be verified to exist before using this function. Originally both were validated, but because this function is frequently used within a loop, those verifications were moved upstream to improve performance on topics with many engaged users. return: bool Always true since: 2.6.0 bbPress (r6320) param: int $user_id Optional. User id param: int $topic_id Optional. Topic id |
bbp_remove_user_engagement( $user_id = 0, $topic_id = 0 ) X-Ref |
Remove a topic from user's engagements return: bool True if the topic was removed from user's engagements, otherwise since: 2.6.0 bbPress (r6320) param: int $user_id Optional. User id param: int $topic_id Optional. Topic id |
bbp_recalculate_topic_engagements( $topic_id = 0, $force = false ) X-Ref |
Recalculate all of the users who have engaged in a topic. This happens when permanently deleting a reply, because that reply author may have authored other replies to that same topic, or the topic itself. You may need to do this manually on heavily active forums where engagement count accuracy is important. return: boolean True if any engagements are added, false otherwise since: 2.6.0 bbPress (r6522) param: int $topic_id param: bool $force |
bbp_update_topic_engagements( $topic_id = 0 ) X-Ref |
Update the engagements of a topic. Hooked to 'bbp_new_topic' and 'bbp_new_reply', this gets the post author and if not anonymous, passes it into bbp_add_user_engagement(). since: 2.6.0 bbPress (r6526) param: int $topic_id |
bbp_get_topic_favoriters( $topic_id = 0 ) X-Ref |
Get the users who have made the topic favorite return: array|bool Results if the topic has any favoriters, otherwise false since: 2.0.0 bbPress (r2658) param: int $topic_id Optional. Topic id |
bbp_get_user_favorites( $args = array() X-Ref |
Get a user's favorite topics return: array Array of topics if user has favorites, otherwise empty array since: 2.0.0 bbPress (r2652) since: 2.6.0 bbPress (r6618) Signature changed to accept an array of arguments param: array $args Optional. Arguments to pass into bbp_has_topics() |
bbp_is_user_favorite( $user_id = 0, $topic_id = 0 ) X-Ref |
Check if a topic is in user's favorites or not return: bool True if the topic is in user's favorites, otherwise false since: 2.0.0 bbPress (r2652) param: int $user_id Optional. User id param: int $topic_id Optional. Topic id |
bbp_add_user_favorite( $user_id = 0, $topic_id = 0 ) X-Ref |
Add a topic to user's favorites Note that both the User and Topic should be verified to exist before using this function. Originally both were validated, but because this function is frequently used within a loop, those verifications were moved upstream to improve performance on topics with many engaged users. return: bool True if the topic was added to user's favorites, otherwise false since: 2.0.0 bbPress (r2652) param: int $user_id Optional. User id param: int $topic_id Optional. Topic id |
bbp_remove_user_favorite( $user_id, $topic_id ) X-Ref |
Remove a topic from user's favorites return: bool True if the topic was removed from user's favorites, otherwise false since: 2.0.0 bbPress (r2652) param: int $user_id Optional. User id param: int $topic_id Optional. Topic id |
bbp_favorites_handler( $action = '' ) X-Ref |
Handles the front end adding and removing of favorite topics param: string $action The requested action to compare this function to |
bbp_get_subscribers( $object_id = 0, $type = 'post' ) X-Ref |
Get the users who have subscribed since: 2.6.0 bbPress (r5156) param: int $object_id Optional. ID of object (forum, topic, or something else) |
bbp_get_user_topic_subscriptions( $args = array() X-Ref |
Get a user's subscribed topics return: array Array of topics if user has topic subscriptions, otherwise empty array since: 2.0.0 bbPress (r2668) since: 2.6.0 bbPress (r6618) Signature changed to accept an array of arguments param: array $args Optional. Arguments to pass into bbp_has_topics() |
bbp_get_user_forum_subscriptions( $args = array() X-Ref |
Get a user's subscribed forums return: array Array of forums if user has forum subscriptions, otherwise empty array since: 2.5.0 bbPress (r5156) since: 2.6.0 bbPress (r6618) Signature changed to accept an array of arguments param: array $args Optional. Arguments to pass into bbp_has_forums() |
bbp_is_user_subscribed( $user_id = 0, $object_id = 0, $type = 'post' ) X-Ref |
Check if an object (forum or topic) is in user's subscription list or not return: bool True if the object (forum or topic) is in user's subscriptions, otherwise false since: 2.5.0 bbPress (r5156) param: int $user_id Optional. User id param: int $object_id Optional. Object id |
bbp_add_user_subscription( $user_id = 0, $object_id = 0, $type = 'post' ) X-Ref |
Add a user subscription return: bool True if the object was added to user subscriptions, otherwise false since: 2.5.0 bbPress (r5156) since: 2.6.0 bbPress (r6544) Added $type parameter param: int $user_id Optional. User id param: int $object_id Optional. Object id param: string $type Optional. Type of object being subscribed to |
bbp_remove_user_subscription( $user_id = 0, $object_id = 0, $type = 'post' ) X-Ref |
Remove a user subscription return: bool True if the object was removed from user subscriptions, otherwise false since: 2.5.0 bbPress (r5156) since: 2.6.0 bbPress (r6544) Added $type parameter param: int $user_id Optional. User id param: int $object_id Optional. Object id param: string $type Optional. Type of object being subscribed to |
bbp_subscriptions_handler( $action = '' ) X-Ref |
Handles the front end toggling of user subscriptions since: 2.0.0 bbPress (r2790) since: 2.6.l bbPress (r6543) param: string $action The requested action to compare this function to |
bbp_get_user_object_ids( $args = array() X-Ref |
Get a user's object IDs For the most part, you should not need to use this function, and may even want to come up with a more efficient way to get IDs on your own. Nevertheless, it is available here for your convenience, using the most efficient query parameters available inside of the various query APIs. return: array|bool Results if user has objects, otherwise null since: 2.6.0 bbPress (r6606) param: int $user_id The user id param: string $rel_key The relationship key param: string $rel_type The relationship type (usually 'post') param: array $args The arguments to override defaults |
bbp_get_moderator_forum_ids( $user_id = 0 ) X-Ref |
Get array of forum IDs that a user can moderate return: array Return array of forum ids, or empty array since: 2.6.0 bbPress (r5834) param: int $user_id User id. |
bbp_get_user_engaged_topic_ids( $user_id = 0 ) X-Ref |
Get a user's engaged topic ids return: array Return array of topic ids, or empty array since: 2.6.0 bbPress (r6320) param: int $user_id Optional. User id |
bbp_get_user_favorites_topic_ids( $user_id = 0 ) X-Ref |
Get a user's favorite topic ids return: array Return array of favorite topic ids, or empty array since: 2.0.0 bbPress (r2652) param: int $user_id Optional. User id |
bbp_get_user_subscribed_forum_ids( $user_id = 0 ) X-Ref |
Get a user's subscribed forum ids return: array Return array of subscribed forum ids, or empty array since: 2.5.0 bbPress (r5156) param: int $user_id Optional. User id |
bbp_get_user_subscribed_topic_ids( $user_id = 0 ) X-Ref |
Get a user's subscribed topic ids return: array Return array of subscribed topic ids, or empty array since: 2.0.0 bbPress (r2668) param: int $user_id Optional. User id |
bbp_get_user_subscriptions( $user_id = 0 ) X-Ref |
Get a user's subscribed topics return: array|bool Results if user has subscriptions, otherwise false since: 2.0.0 bbPress (r2668) param: int $user_id Optional. User id |
bbp_get_forum_subscribers( $forum_id = 0 ) X-Ref |
Get the users who have subscribed to the forum return: array|bool Results if the forum has any subscribers, otherwise false since: 2.5.0 bbPress (r5156) param: int $forum_id Optional. forum id |
bbp_get_topic_subscribers( $topic_id = 0 ) X-Ref |
Get the users who have subscribed to the topic return: array|bool Results if the topic has any subscribers, otherwise false since: 2.0.0 bbPress (r2668) param: int $topic_id Optional. Topic id |
bbp_is_user_subscribed_to_forum( $user_id = 0, $forum_id = 0 ) X-Ref |
Check if a forum is in user's subscription list or not return: bool True if the forum is in user's subscriptions, otherwise false since: 2.5.0 bbPress (r5156) param: int $user_id Optional. User id param: int $forum_id Optional. Forum id |
bbp_is_user_subscribed_to_topic( $user_id = 0, $topic_id = 0 ) X-Ref |
Check if a topic is in user's subscription list or not return: bool True if the topic is in user's subscriptions, otherwise false since: 2.5.0 bbPress (r5156) param: int $user_id Optional. User id param: int $topic_id Optional. Topic id |
bbp_remove_user_forum_subscription( $user_id = 0, $forum_id = 0 ) X-Ref |
Remove a forum from user's subscriptions return: bool True if the forum was removed from user's subscriptions, since: 2.5.0 bbPress (r5156) param: int $user_id Optional. User id param: int $forum_id Optional. forum id |
bbp_remove_user_topic_subscription( $user_id = 0, $topic_id = 0 ) X-Ref |
Remove a topic from user's subscriptions return: bool True if the topic was removed from user's subscriptions, since: 2.5.0 bbPress (r5156) param: int $user_id Optional. User id param: int $topic_id Optional. Topic id |
bbp_add_user_forum_subscription( $user_id = 0, $forum_id = 0 ) X-Ref |
Add a forum to user's subscriptions return: bool Always true since: 2.5.0 bbPress (r5156) param: int $user_id Optional. User id param: int $forum_id Optional. forum id |
bbp_add_user_topic_subscription( $user_id = 0, $topic_id = 0 ) X-Ref |
Add a topic to user's subscriptions Note that both the User and Topic should be verified to exist before using this function. Originally both were validated, but because this function is frequently used within a loop, those verifications were moved upstream to improve performance on topics with many engaged users. return: bool Always true since: 2.0.0 bbPress (r2668) param: int $user_id Optional. User id param: int $topic_id Optional. Topic id |
bbp_forum_subscriptions_handler( $action = '' ) X-Ref |
Handles the front end toggling of forum subscriptions since: 2.5.0 bbPress (r5156) |
Generated: Thu Jan 30 01:00:58 2025 | Cross-referenced by PHPXref 0.7.1 |