はてなブックマークボタンを加える
ボタンの横幅を設定画面で変更ができるようになったので、ソースコードも大きく変わっているかな?と思ったけどそんなことはなかった。tf_display.php にちょこっとコードを加えれば、簡単に「はてなブックマークボタン」を表示することができる。
以下は tf_display.php の kc_social_share 関数の最後の部分。$output .= で「はてなブックマークボタン」のコードを書き出している。
$output .= ' <div style="float:left; width:115px;padding-right:10px; margin:4px 4px 4px 4px; height:30px;"> <a href="http://b.hatena.ne.jp/entry/' . $post_link . '" class="hatena-bookmark-button" data-hatena-bookmark-title="' . $post_title .'" data-hatena-bookmark-layout="standard" title="このエントリーをはてなブックマークに追加"> <img src="http://b.st-hatena.com/images/entry-button/button-only.gif" alt="このエントリーをはてなブックマークに追加" width="20" height="20" style="border: none;" /> </a> <script type="text/javascript" src="http://b.st-hatena.com/js/bookmark_button.js" charset="utf-8" async="async"></script> </div>'; $output .= ' </div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>'; return $output; } }
というわけで、Wordpress 3.2 も日本語になった。Add Twitter, Facebook Like, Google plus one Social share も 2.0 になって、それに「はてなブックマークボタン」を加えた。これで Wordpress 周りは一通り OK かな。