aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-10-19 20:12:37 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-10-19 20:12:37 -0400
commitfd9393ef8575ad4a8966ae7f5310aab688dedf48 (patch)
tree6854fa55eb8ce4c703c48da585ba372d0f17ab2e /doc
parent3bdc66d30045a7259a7a71173fc6ce85b17cfaf6 (diff)
downloadikiwiki-fd9393ef8575ad4a8966ae7f5310aab688dedf48.tar
ikiwiki-fd9393ef8575ad4a8966ae7f5310aab688dedf48.tar.gz
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.
Diffstat (limited to 'doc')
-rw-r--r--doc/plugins/write.mdwn8
1 files changed, 7 insertions, 1 deletions
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);