vapvarun

Add support for What's App

Feb 9th, 2018
436
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', 'wbcom_add_new_service', 10, 3 );
  2.  
  3. function wbcom_add_new_service( $services, $activity_link, $activity_title ) {
  4.  
  5.     $services = array
  6.         (
  7.             'chb_bp_share_whatsapp' => 1,
  8.             'service_name' => 'Whatsapp',
  9.             'service_icon' => 'fa fa-whatsapp',
  10.             'service_description' => 'Facebook is an American for-profit corporation and online social media and social networking service based in Menlo Park, California, United States'
  11.         ) ;
  12.         echo '<a target="blank" href="whatsapp://send?text=' . $activity_title .' '. $activity_link . '" class="whatsapp-button whatsapp-share bp-share" rel="whatsapp"><span class="fa-stack fa-lg"><i class="' . $services[ 'service_icon' ] . '"></i></span></a>';
  13. }
Add Comment
Please, Sign In to add comment