UPDATE: Having updated the plugin several times, I have realised the folly of the suggestions below as they get over-written each time (DOH). Fortunately my increasing use of jQuery threw up a really simple solution, simply add this to your header and Hey Presto! all your twitter tools links will now have ‘target=”_blank”‘ added to them.
<script>
jQuery(function($) {
$("div.aktt_tweets a" ).attr('target', '_blank');
});
</script>
Our site makes use of the Twitter Tools plugin, but with some minor tweaks
The only links that Twitter Tools displays with our set-up are the bit.ly links, the link to the specific tweet (e.g. “1 hr ago”) and the “More Updates…” link. All of these links will open their target in the same window, but we wanted them to open an external window so the user remains on the site.
To do this, you need to locate the plugin’s main coding. This is currently at:
wp-content/plugins/twitter-tools/twitter-tools.php
Now make the folllowing changes:
“More Updates Link”: Change Line 812:
$output .= ' <li class="aktt_more_updates"><a href="'.aktt_profile_url($aktt->twitter_username).'">'.__('More updates...', 'twitter-tools').'</a></li>'."\n";
To:
$output .= ' <li class="aktt_more_updates"><a href="'.aktt_profile_url($aktt->twitter_username).'" target="_blank">'.__('More updates...', 'twitter-tools').'</a></li>'."\n";
“Time Display Link”: Change Line 879:
$output .= ' <a href="'.aktt_status_url($aktt->twitter_username, $tweet->tw_id).'" class="aktt_tweet_time">'.$time_display.'</a>';
To:
$output .= ' <a href="'.aktt_status_url($aktt->twitter_username, $tweet->tw_id).'" class="aktt_tweet_time" target="_blank">'.$time_display.'</a>';
“Bit.ly links”: Change Line: 881:
return $output;
To:
$output = str_replace('rel="nofollow">', 'target="_blank" rel="nofollow">', $output);
return $output;
