if ( !empty( $subscriptions ) ) {
$subscriptions = implode( ',', $subscriptions );
update_user_meta( $user_id, '_bbp_subscriptions', $subscriptions );
} else {
delete_user_meta( $user_id, '_bbp_subscriptions' );
}
}
do_action( 'bbp_remove_user_subscription', $user_id, $topic_id );
return true;
}
/**
* Handles the front end subscribing and unsubscribing topics
*
* @uses bbp_is_subscriptions_active() To check if the subscriptions are active
* @uses bbp_get_user_id() To get the user id
* @uses current_user_can() To check if the current user can edit the user