Update main.php

pull/8/head
SuperDev 3 years ago committed by GitHub
parent 7f2a86ff6f
commit 3a35b5fcb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -146,5 +146,12 @@ function time_elapsed_string($datetime, $full = false) {
if (!$full) $string = array_slice($string, 0, 1);
return $string ? implode(', ', $string) . ' ago' : 'just now';
}
function str_to_version_info($string)
{
$latest_version = FALSE;
if (preg_match('/^\s*?(\d+\.\d+\.\d+)/i', $string, $match)) {
$latest_version = $match[1];
}
return $latest_version;
}
?>

Loading…
Cancel
Save