Time markup for Last Changed field

This adds semantic markup to the "last change" date in the article footer. This change should not have any impact on the rendering of the page.
This commit is contained in:
Sascha Leib
2024-11-03 10:50:59 +01:00
parent 8b19906e58
commit 7370732e5e

View File

@ -948,7 +948,8 @@ function tpl_pageinfo($ret = false)
}
}
$fn = utf8_decodeFN($fn);
$date = dformat($INFO['lastmod']);
$dateLocal = dformat($INFO['lastmod']);
$dateIso = date(DATE_ISO8601, $INFO['lastmod']);
// print it
if ($INFO['exists']) {
@ -956,7 +957,7 @@ function tpl_pageinfo($ret = false)
$out .= ' · ';
$out .= $lang['lastmod'];
$out .= ' ';
$out .= $date;
$out .= '<time datetime="' . $dateIso . '">' . $dateLocal . '</time>';
if ($INFO['editor']) {
$out .= ' ' . $lang['by'] . ' ';
$out .= '<bdi>' . editorinfo($INFO['editor']) . '</bdi>';