Share Post Social Media

Send Snippet To: Save this snippet to Code Collector Pro -- view all ceniack's snippets
language: PHP
license: Other

Code for Snippet:

                
<div class="share-post"> <span class="share-text">
<?php _e( 'Share !' , 'tie' );?>
</span>
<ul>
<?php if( tie_get_option( 'share_tweet' ) ): ?>
<li><a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>" data-text="<?php the_title(); ?>" data-via="<?php echo tie_get_option( 'share_twitter_username' ) ?>" data-lang="en">tweet</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></li>
<?php endif; ?>
<?php if( tie_get_option( 'share_facebook' ) ): ?>
<li>
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php the_permalink(); ?>&amp;layout=button_count&amp;show_faces=false&amp;width=105&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:105px; height:21px;" allowTransparency="true"></iframe>
</li>
<?php endif; ?>
<?php if( tie_get_option( 'share_google' ) ): ?>
<li style="width:80px;">
<div class="g-plusone" data-size="medium" data-href="<?php the_permalink(); ?>"></div>
<script type='text/javascript'>
			  (function() {
				var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
				po.src = 'https://apis.google.com/js/plusone.js';
				var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
			  })();
			</script>
</li>
<?php endif; ?>
<?php if( tie_get_option( 'share_stumble' ) ): ?>
<li>
<su:badge layout="2"></su:badge>
<script type="text/javascript">
				(function() {
					var li = document.createElement('script'); li.type = 'text/javascript'; li.async = true;
					li.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + '//platform.stumbleupon.com/1/widgets.js';
					var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(li, s);
				})();
			</script>
</li>
<?php endif; ?>
<?php if( tie_get_option( 'share_linkdin' ) ): ?>
<li><script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="<?php the_permalink(); ?>" data-counter="right"></script></li>
<?php endif; ?>
<?php if( tie_get_option( 'share_pinterest' ) ): ?>
<li style="width:80px;"><script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script><a href="http://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>&amp;media=<?php echo tie_thumb_src('', 660 ,330); ?>" class="pin-it-button" count-layout="horizontal"><img border="0" src="http://assets.pinterest.com/images/PinExt.png" title="Pin It"/></a></li>
<?php endif; ?>
</ul>
<div class="clear"></div>
</div>
comments powered by Disqus

Info

Source Site:

http://www.codecollector.net/view/D86DD513-1905-4654-9B4A-F3F01F79BD4F-56584-00011E5232ECEC3E

Tags: Wordpress

Link to this snippet:


Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 629
Date Added: 2014-04-10 18:23:35
Last Modified: 2014-04-10 12:23:37

Web Analytics