Advertisement
vapvarun

BuddyPress Social Share - Telegram

Aug 30th, 2021
1,291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. add_action( 'bp_share_user_services', 'telegram_add_new_service', 10, 3 );
  2.  
  3. function telegram_add_new_service( $services, $activity_link, $activity_title ) {
  4.  
  5.     $services = array
  6.         (
  7.             'chb_bp_share_telegram' => 1,
  8.             'service_name' => 'Telegram',
  9.             'service_icon' => 'fa fa-telegram',
  10.             'service_description' => 'Telegram messages are heavily encrypted and can self-destruct. Synced. Telegram lets you access your chats from multiple devices.'
  11.         ) ;
  12.         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>';
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement