SHARE
TWEET

links to share a post among social networks

marcopanichi Jun 6th, 2015 437 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function share_links()
  2. {
  3.         global $post;
  4.         $url = urlencode(get_permalink());
  5.         $title = urlencode(get_the_title());
  6.         return "
  7.                 <span class='condivisioni'>
  8.                         <a target='_blank' class='btn btn-danger google' href='https://plus.google.com/share?url=$url'>Condividi su G+</a>&nbsp;
  9.                         <a target='_blank' class='btn btn-primary facebook' href='https://www.facebook.com/sharer/sharer.php?u=$url&amp;t=$title'>Condividi su Facebook</a>&nbsp;
  10.                         <a target='_blank' class='btn btn-info twitter' href='https://twitter.com/intent/tweet?url=$url&amp;text=$title'>Tweet</a>&nbsp;
  11.                 </span>
  12.         ";
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top