Skip to content

Commit 7370732

Browse files
committed
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.
1 parent 8b19906 commit 7370732

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

inc/template.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -948,15 +948,16 @@ function tpl_pageinfo($ret = false)
948948
}
949949
}
950950
$fn = utf8_decodeFN($fn);
951-
$date = dformat($INFO['lastmod']);
951+
$dateLocal = dformat($INFO['lastmod']);
952+
$dateIso = date(DATE_ISO8601, $INFO['lastmod']);
952953

953954
// print it
954955
if ($INFO['exists']) {
955956
$out = '<bdi>' . $fn . '</bdi>';
956957
$out .= ' · ';
957958
$out .= $lang['lastmod'];
958959
$out .= ' ';
959-
$out .= $date;
960+
$out .= '<time datetime="' . $dateIso . '">' . $dateLocal . '</time>';
960961
if ($INFO['editor']) {
961962
$out .= ' ' . $lang['by'] . ' ';
962963
$out .= '<bdi>' . editorinfo($INFO['editor']) . '</bdi>';

0 commit comments

Comments
 (0)