I have this function
function theme_status_time_link($status, $is_link = true) {
$time = strtotime($status->created_at);
if ($time > 0) {
if (twitter_date('dmy') == twitter_date('dmy', $time) && !setting_fetch('timestamp')) {
$out = format_interval(time() - $time, 1). ' ago';
} else {
$out = twitter_date('H:i', $time);
}
} else {
$out = $status->created_at;
}
if ($is_link)
$out = "<a href='status/{$status->id}' class='time'>$out</a>";
return $out;
}
and this
function twitter_is_reply($status) {
$html = " <b><a href='user/{$status->from->screen_name}'>{$status->from->screen_name}</a></b><br /> $actions $link<br />{$text} <small>$source</small>";
}
I need to pass the variable $out from the first function to the second function, precisely to the $html variable in the second function. However, everything I try either gives me errors and outputs nothing. Without using globals because it appears multiple times in my script. Thanks.
theme_status_time_link($status, $is_link = true, &$buffer){ ... }
function twitter_is_reply($status, &$buffer) { .. }
Is it what you think? By this you will be able to pass a reference to a variable. Tell me if this is your point. The second thing is you can call the second function in the first function, immediately before return.twitter_is_reply($status, $out) {...}
? If else - provide more info how twitter_is_reply should be called...