Skip to content

Instantly share code, notes, and snippets.

@jimcallender
Forked from mattradford/social_share.php
Created November 12, 2014 10:48
Show Gist options
  • Save jimcallender/97cb9a6b41e9c4935f93 to your computer and use it in GitHub Desktop.
Save jimcallender/97cb9a6b41e9c4935f93 to your computer and use it in GitHub Desktop.
<div class="social-icons">
<a class="icon-twitter" href="javascript:window.location=%22https://twitter.com/share?url=%22+encodeURIComponent(document.location)+%22&text=%22+encodeURIComponent(document.title)" title="<?php _e('Share on Twitter','roots'); ?>"></a>
<a class="icon-facebook" href="javascript:window.location=%22http://www.facebook.com/sharer.php?u=%22+encodeURIComponent(document.location)+%22&#38;t=%22+encodeURIComponent(document.title)" title="<?php _e('Share on Facebook','roots'); ?>"></a>
<a class="icon-linkedin" href="http://www.linkedin.com/shareArticle?mini=true&url=<?php if(is_home()){echo home_url();}else{the_permalink();} ?>" title="<?php _e('Share on LinkedIn','roots'); ?>"></a>
<a class="icon-google" href="https://plusone.google.com/_/+1/confirm?hl=en&url=<?php if(is_home()){echo home_url();}else{the_permalink();} ?>" title="<?php _e('Share on Google+','roots'); ?>"></a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment