Skip to content

Instantly share code, notes, and snippets.

@semicolon
Created July 14, 2015 14:03
Show Gist options
  • Save semicolon/7e7c9adaad54aab56bb0 to your computer and use it in GitHub Desktop.
Save semicolon/7e7c9adaad54aab56bb0 to your computer and use it in GitHub Desktop.
WordPress functions.php に AddThis 設定を追加
add_action('wp_footer', 'addthis_conf');
function addthis_conf() {
echo <<<EOS
<script type="text/javascript">
var addthis_share =
{
templates: {
twitter: '{{title}} {{url}} (from @semicolon)'
}
}
</script>
EOS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment