示例#1
0
?>
" target="_blank">Share Now On Facebook</a></p>
				<?php 
if (artist_has_twitter()) {
    ?>
				<h2>Follow <?php 
    artist_name();
    ?>
 on Twitter</h2>
				<p>Find out what <?php 
    artist_name();
    ?>
 is up to on Twitter.</p>
				<p>
					<a href="https://twitter.com/intent/user?screen_name=<?php 
    artist_twitter_user_name();
    ?>
" target="_blank">Follow Now</a>
				</p>
				<?php 
}
?>
			</div> <!-- end div.entry -->
		</div> <!-- end div.page mod.1 -->

		<div class="mod post cc">
			<div class="mod-meta">
				<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" src="<?php 
bloginfo('stylesheet_directory');
?>
/images/release_cc.png" alt="Creative Commons" /></a>
示例#2
0
/**
 * Creates a Twitter follow link for the artist, embedding the Twitter follow code.
 *
 * @author Alex Andrews <*****@*****.**>
 * @return string Nothing, but echos out the Twitter follow link.
 */
function artist_twitter_follow_link()
{
    $html = '';
    $html .= '<a href="' . artist_twitter_link(false) . '" class="twitter-follow-button" data-show-count="false" data-dnt="true">Follow @' . artist_twitter_user_name(false) . '</a>';
    $html .= "<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>";
    echo $html;
}