You could use the “widget_twitter_content” filter to modify the tweet text to include the avatar of the person that tweeted it. The actual tweet info from Twitter is supplied as the second argument to that filter, and I think that would have everything you need in it.
Thanks for taking the time to reply. That ended up sending me down the path I used. For anyone trying to do what I did, here’s my solution:
Inside the loop (around line 640):
foreach ( $tweets as $tweet ) {
I added:
if ($tweet->retweeted_status->user->profile_image_url == "") {
$widgetContent .= "<span class='entry-image'><img src='".$tweet->user->profile_image_url."' /></span>";
} else {
$widgetContent .= "<span class='entry-image'><img src='".$tweet->retweeted_status->user->profile_image_url."' /></span>";
}
The problem with doing it that way is that the next time I release an update to the plugin you’ll have to edit it again (and then again and again as the plugin continues to receive updates). Instead try this:
function range_widget_twitter_content( $content, $tweet ) {
$image_link = '<a href="http://twitter.com/%1$s"><span class="entry-image"><img src="%2$s" /></span></a>%3$s';
if ( empty( $tweet->retweeted_status ) )
$content = sprintf( $image_link, $tweet->user->screen_name, $tweet->user->profile_image_url, $content );
else
$content = sprintf( $image_link, $tweet->retweeted_status->user->screen_name, $tweet->retweeted_status->user->profile_image_url, $tweet->retweeted_status->text );
return $content;
}
add_filter( 'widget_twitter_content', 'range_widget_twitter_content', null, 2 );
That will add the profile image to each tweet, link that profile image to the correct user account on Twitter, and also replace the content with the original tweet content if it’s a retweet.
Oh, that code should go in another plugin or in your theme’s functions.php file.
Thank you so much for both the great plug-in and the time to help. This is working great in my functions.php file.
I’m still trying to figure out how all these filters add content without clobbering each other, but that’s just my newness to WP’s plug in framework I think.