X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/16d51e67a7e7257739e1cb3f9a3713d448065e5d..9bad51a77661173a4126f49da8e726ae839c6922:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index edee8aacb..207ca87fb 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -898,6 +898,23 @@ sub abs2rel ($$) { #{{{ } #}}} sub displaytime ($;$) { #{{{ + my $time=shift; + my $format=shift; + if (exists $hooks{displaytime}) { + my $ret; + run_hooks(displaytime => sub { + $ret=shift->($time, $format) + }); + return $ret; + } + else { + return formattime($time, $format); + } +} #}}} + +sub formattime ($;$) { #{{{ + # Plugins can override this function to mark up the time for + # display. my $time=shift; my $format=shift; if (! defined $format) {