Very close. All I need is the text of the last tweet. But I ended up using your existing code to create my own short code: [tweet user=lamarant], which calls a modified function:
function last_tweet_text( $screen_name = ” ){
$items = latest_tweets_render( $screen_name, 1, false, false );
return $items[0];
}
That returns the last tweet and date stamp in <p> elements. I remove the date <p> using css (display: none) and voila.
https://www.leonamarant.com/
It would be cool if your plugin could include a web service that returned the raw JSON from the users Twitter feed (like the old API). That way you could call the service (using jQuery.ajax() for example) and do whatever you wanted with the data. I think this could be done using the wp_ajax method but I’m not 100% sure (it’s been a while).
In any case…great work on this plugin. I was worried that I was going to have to create this myself! Thanks again.