bbp_get_user_subscribed_topic_ids( int $user_id )
Get a user’s subscribed topics’ ids
Description
Parameters
- $user_id
-
(int) (Optional) User id
Return
(array|bool) Results if user has subscriptions, otherwise false
Source
File: bp-forums/users/functions.php
function bbp_get_user_subscribed_topic_ids( $user_id = 0 ) { $user_id = bbp_get_user_id( $user_id ); if ( empty( $user_id ) ) return false; $subscriptions = get_user_option( '_bbp_subscriptions', $user_id ); $subscriptions = array_filter( wp_parse_id_list( $subscriptions ) ); return (array) apply_filters( 'bbp_get_user_subscribed_topic_ids', $subscriptions, $user_id ); }
Changelog
Version | Description |
---|---|
bbPress (r2668) | 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.