AddThis is a quite useful WordPress plugin for adding a host of sharing options to your blog posts.
By default, the “Tweet” button that AddThis provides will append “via @AddThis” to the end of tweets, which seems to me a little uncool, given that it’s your content.
So, here’s a little plugin that lets you specify your own Twitter account name instead of @AddThis.
The principle is simple: AddThis were kind enough to define their own filter for the plugin’s output. The plugin plugs itself into this filter, and makes an adjustment to the Tweet button.
To use it, put
addthis-modifier.php into your
wp-content/plugins folder, open it up and set your twitter name where indicated. Activate it, and you should be good to go.
Download the plugin: AddThis Modifier Plugin
For extra marks: Here’s some code you can use to replace line 14 (the $twittername = … line) to provide a different Twitter account for each post author. Is that not awesome?:
$accounts = array('Michael' => 'MichaelTyson', 'Katherine' => 'NellieWindmill'); $twittername = $accounts[get_the_author()];