- Responsive Multi-Purpose Theme Framework! ›
- Forums ›
- Theme Support ›
- Bootstrap icon favorite and subscribe
Hello,
I was wondering how to add bootstrap icons to the subscribe and favorite option.
I cannot seem to find where I should do this. You have it here http://social.theme.firmasite.com/forums/topic/another-topic-2/
Regards,
Monique
It requires firmasite plugin for font-awesome icons:
/* * This action adds icons to Favorite and Subscribe buttons on bbPress */ add_action( 'wp_footer', "firmasite_social_subscription_icons"); function firmasite_social_subscription_icons(){ ?> <script type="text/javascript"> (function ($) { $(document).ready(function() { firmasite_social_subscription_icon(); firmasite_social_favorite_icon(); }); $("#subscription-toggle").on("DOMNodeInserted", function(){ firmasite_social_subscription_icon(); }); $("#favorite-toggle").on("DOMNodeInserted", function(){ firmasite_social_favorite_icon(); }); function firmasite_social_subscription_icon(){ // Removing bad looking | section if($('#subscription-toggle').length>0){ $('#subscription-toggle').get(0).firstChild.nodeValue = ""; } if($("#subscription-toggle i").length == 0){ $("#subscription-toggle span").prepend('<i></i>'); } if ($("#subscription-toggle span").hasClass("is-subscribed")){ $("#subscription-toggle i").removeClass('icon-envelope').addClass('icon-envelope-alt'); } else { $("#subscription-toggle i").removeClass('icon-envelope-alt').addClass('icon-envelope'); } } function firmasite_social_favorite_icon(){ if($("#favorite-toggle i").length == 0){ $("#favorite-toggle span").prepend('<i></i>'); } if ($("#favorite-toggle span").hasClass("is-favorite")){ $("#favorite-toggle i").removeClass('icon-star-empty').addClass('icon-star'); } else { $("#favorite-toggle i").removeClass('icon-star').addClass('icon-star-empty'); } } })(jQuery); </script> <?php }
np.. meanwhile this is new bbpress feature.. threaded comment example!
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.