brad2dabone + php   17

How to display your latest tweets in your WordPress blog without a plugin « Dino Latoga
<?php $tweet = str_replace($username.':','',$item->get_title()); //replaces the username which is displayed on the feed $tweet = makeClickableLinks($tweet); //converts text links to clickable links $tweet = preg_replace('#@([dw]+)#', '<a href="http://twitter.com/$1">$0</a>', $tweet);//converts hashtags to clickable links $tweet = preg_replace('/#([dw]+)/', '<a href="http://twitter.com/search?q=%23$1">$0</a>', $tweet);//converts @username to links echo $tweet . " <small><a href='".$item->get_permalink()."'>" . human_time_diff($item->get_date('U'), current_time('timestamp')) . " ago</a></small>"; ?>
twitter  tweet  wordpress  php 
march 2012 by brad2dabone

Copy this bookmark:



description:


tags: