Function to check if user is subscribes to a current forum
-
Hello there,
Thank you for viewing this thread.
I am trying to set a button for based on users current forum subscription status
When a User “is not Subcribed” to Current Forum
<button type="button" class="btn-lg omna-btn-green shadow-sm" id="forum-subscription-btn"><i class="fa fa-bell"></i> <?php bbp_forum_subscription_link(); ?></button> <p>Subscribe to this forum and get updates on latest topics</p>
When a User “is Subscribed” to Current Forum
<button type="button" class="btn-lg omna-btn-green shadow-sm" id="forum-subscription-btn"><i class="fa fa-bell-slash"></i> <?php bbp_forum_subscription_link(); ?></button> <p>Unsubscribe from this forum and stop receiving updates on latest topics</p>
So My Code is suppose to look something like
<?php if (user_is_subcribed_to_this_forum): ?> <button type="button" class="btn-lg omna-btn-green shadow-sm" id="forum-subscription-btn"><i class="fa fa-bell-slash"></i> <?php bbp_forum_subscription_link(); ?></button> <p>Unsubscribe from this forum and stop receiving updates on latest topics</p> <?php else: ?> <button type="button" class="btn-lg omna-btn-green shadow-sm" id="forum-subscription-btn"><i class="fa fa-bell"></i> <?php bbp_forum_subscription_link(); ?></button> <p>Subscribe to this forum and get updates on latest topics</p> <?php endif; ?>
The right function to use in-place of
user_is_subcribed_to_this_forum
is what i seek.Thanking you in anticipation of a working response.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.