\\2", $ret); $ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r< ]*)#", "\\1\\2", $ret); $ret = preg_replace("/@(\w+)/", "@\\1", $ret); /* hashtags */ $ret = preg_replace("/#(\w+)/", "#\\1", $ret); return $ret; } endif; if ( ! function_exists( 'ut_twitter_time_ago' ) ) : function ut_twitter_time_ago($oldTime, $newTime) { $timeCalc = $newTime - $oldTime; if ( $timeCalc > (60*60*24) ) { $timeCalc = round($timeCalc/60/60/24) . __(" days ago" , 'ut_lang' ); } else if ( $timeCalc > (60*60) ) { $timeCalc = round($timeCalc/60/60) . __(" hours ago" , 'ut_lang' ); } else if ( $timeCalc > 60 ) { $timeCalc = round($timeCalc/60) . __(" minutes ago" , 'ut_lang' ); } else if ( $timeCalc > 0 ) { $timeCalc .= __(" seconds ago" , 'ut_lang' ); } return $timeCalc; } endif; ?>