From fd9393ef8575ad4a8966ae7f5310aab688dedf48 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 19 Oct 2008 20:12:37 -0400 Subject: add displaytime hook Need to use a hook because an exported function cannot be reliably overridden. The replacement verstion was actually only affecting plugins loaded after it. formattime doesn't need a hook, since there's no reason to export it. --- doc/plugins/write.mdwn | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc/plugins/write.mdwn') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index daf70c8e2..856b34ba1 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -196,7 +196,6 @@ generating the page. hook(type => "pagetemplate", id => "foo", call => \&pagetemplate); - [[Templates|wikitemplates]] are filled out for many different things in ikiwiki, like generating a page, or part of a blog page, or an rss feed, or a cgi. This hook allows modifying the variables available on those @@ -361,6 +360,13 @@ This hook is called whenever ikiwiki normally saves its state, just before the state is saved. The function can save other state, modify values before they're saved, etc. +### displaytime + + hook(type => "displaytime", id => "foo", call => \&display); + +This hook can be registered to override the regular `displaytime` function. +Only the last displaytime hook will be used. + ### renamepage hook(type => "renamepage", id => "foo", call => \&renamepage); -- cgit v1.2.3