Created
May 28, 2012 07:48
-
-
Save TAKAyukiatkwsk/2817905 to your computer and use it in GitHub Desktop.
WordPressサイトにはてなスターを設置する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_hatena_star_code() { | |
?> | |
<script type="text/javascript" src="http://s.hatena.ne.jp/js/HatenaStar.js"></script> | |
<script type="text/javascript"> | |
Hatena.Star.SiteConfig = { | |
entryNodes: { | |
'article': { | |
uri: 'h1 a', | |
title: 'h1', | |
container: 'h1' | |
} | |
} | |
}; | |
</script> | |
<?php if ( $_SERVER['SERVER_NAME'] == 'blogaomu.com' ) : ?> | |
<script type="text/javascript"> | |
Hatena.Star.Token = 'token'; | |
</script> | |
<?php endif; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment