diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-10-15 19:33:52 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-10-15 19:33:52 +0000 |
commit | b973ed82699903c23b3feeb5e73e1ebd6f587f43 (patch) | |
tree | af25dcd50842673244ced0b7d97ad01dcf10f13f /IkiWiki.pm | |
parent | 8544d52fe9e5d344bb0b5e70985aabc0e35b4920 (diff) | |
download | ikiwiki-b973ed82699903c23b3feeb5e73e1ebd6f587f43.tar ikiwiki-b973ed82699903c23b3feeb5e73e1ebd6f587f43.tar.gz |
* Add no_override parameter to hook().
* Add a shortcut plugin, inspired by Victor Moral's contributed shortcuts
plugin, but featuring a more ikiwiki-ish syntax and with shortcuts that
can be configured using a page in wiki.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index a39e317f5..7084e9627 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -641,6 +641,8 @@ sub hook (@) { # {{{ if (! exists $param{type} || ! ref $param{call} || ! exists $param{id}) { error "hook requires type, call, and id parameters"; } + + return if $param{no_override} && exists $hooks{$param{type}}{$param{id}}; $hooks{$param{type}}{$param{id}}=\%param; } # }}} |