I think I found a bug in bbp_topic_subscription_link
-
Hi
I am trying to use bbp_topic_subscription_link with a genericon icon.No problem displaying the icons on browser load, but as Ajax is being used the reverse genericon on a click, the icon is not reversed on the this click. Instead a “|” is displayed even though I have set the array to not display that. I have tried loading the icons through the subscribe/unsubscribe settings, and via an “if” with the conditional tag, ‘bbp_is_user_subscribed_to_topic()’ in “before” with separate subscribe and unsubscribe statements.
Example 1
<span class="my-class"><?php bbp_topic_subscription_link(array('unsubscribe'=> '<i class="genericon genericon-unsubscribe"></i>Unsubscribe','subscribe'=> '<i class="genericon genericon-subscribe"></i>Subscribe','before' => ' ')); ?></span>
Example 2
<?php if (bbp_is_user_subscribed_to_topic()) { ?> <span class="my-class"><?php bbp_topic_subscription_link(array('unsubscribe'=> '<i class="genericon genericon-unsubscribe"></i>Unsubscribe')); ?></span> <?php } else { ?> <span class="my-class"><?php bbp_topic_subscription_link(array('subscribe'=> '<i class="genericon genericon-subscribe"></i>Subscribe')); ?></span> <?php }
Cheers
Mike
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- You must be logged in to reply to this topic.