Skip to content

Instantly share code, notes, and snippets.

@eduardozulian
Created February 7, 2015 17:57
Show Gist options
  • Save eduardozulian/6be7de7561bc4204a8bd to your computer and use it in GitHub Desktop.
Save eduardozulian/6be7de7561bc4204a8bd to your computer and use it in GitHub Desktop.
Prints HTML with share buttons
<?php
/**
* Prints HTML with share buttons
*/
function wp_entry_share() {
$permalink = wp_get_shortlink();
?>
<ul class="entry-share">
<li class="entry-share__item">
<a href="https://twitter.com/home?status=<?php echo $permalink; ?>" class="share-link share-link--twitter">Twitter</a>
</li>
<li class="entry-share__item">
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $permalink; ?>" class="share-link share-link--facebook">Facebook</a>
</li>
<li class="entry-share__item">
<a href="https://plus.google.com/share?url=<?php echo $permalink; ?>" class="share-link share-link--googleplus">Google+</a>
</li>
</ul>
<?php
}
?>
@seufelipe
Copy link

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment