add_action( 'bp_share_user_services', 'telegram_add_new_service', 10, 3 );
function telegram_add_new_service( $services, $activity_link, $activity_title ) {
$services = array
(
'chb_bp_share_telegram' => 1,
'service_name' => 'Telegram',
'service_icon' => 'fa fa-telegram',
'service_description' => 'Telegram messages are heavily encrypted and can self-destruct. Synced. Telegram lets you access your chats from multiple devices.'
) ;
echo '<a target="blank" href="https://t.me/share/url?url='. $activity_link . '&text=' . $activity_title .'" class="telegram-button telegram-share bp-share" rel="telegram"><span class="fa-stack fa-lg"><i class="' . $services[ 'service_icon' ] . '"></i></span></a>';
}
Comments