Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:6a1e0782834fc806668a
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
$last_reply_time = 0;
if (isset($comments[(count($comments) - 1)])) {
$last_reply_time = strtotime($comments[(count($comments) - 1)]->comment_date_gmt);
}
else if (count($social_items)) {
$latest_item = null;
foreach ($social_items as $service => $items) {
foreach ($items as $comment) {
if ($latest_item === null) {
$latest_item = strtotime($comment->comment_date_gmt);
}
else {
$time = strtotime($comment->comment_date_gmt);
if ($time > $latest_item) {
$latest_item = $time;
}
}
}
}
 
if ($latest_item !== null) {
$last_reply_time = $latest_item;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.