Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Created February 4, 2013 13:54
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deckerweb/4706862 to your computer and use it in GitHub Desktop.
Save deckerweb/4706862 to your computer and use it in GitHub Desktop.
Display Jetpack "Sharing" buttons on bbPress 2.x forums/ topics/ lead topics/ replies.
<?php
add_action( 'bbp_get_topic_content', 'ddw_jetpack_sharing_bbpress');
//add_action( 'bbp_get_reply_content', 'ddw_jetpack_sharing_bbpress' );
add_action( 'bbp_template_before_single_forum', 'ddw_jetpack_sharing_bbpress' );
add_action( 'bbp_template_before_single_topic', 'ddw_jetpack_sharing_bbpress' );
add_action( 'bbp_template_before_lead_topic', 'ddw_jetpack_sharing_bbpress' );
/**
* Display Jetpack "Sharing" buttons on bbPress 2.x forums/ topics/ lead topics/ replies.
*
* @author David Decker - DECKERWEB
* @link http://deckerweb.de/twitter
*/
function ddw_jetpack_sharing_bbpress() {
/** If Jetpack "Sharing" function is active, just display it :) */
if ( function_exists( 'sharing_display' ) ) {
echo sharing_display();
} // end-if
} // end function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment