X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/39d44d443d2271ec8787e6192b8b5811bee41ebf..fadb26bc1507f7fc2caaa873ad32c12f75c378aa:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 36e85d413..67cd2147d 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -920,6 +920,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) {