Module:Hooks: Difference between revisions
From Guild of Archivists
m (as with JS stuff, some <nowiki> arround to not parse the text on page save) |
m (1 revision imported) |
(No difference)
|
Latest revision as of 07:26, 30 October 2015
Documentation for this module may be created at Module:Hooks/doc
-- This is a way to include a bunch of hooks on an extension page.
-- Pass in a comma-separated list of hooks you use.
-- <nowiki>
local explode = require('Explode').explode
return {
make_hook_list = function (hookstr)
local hooklist = explode(',', hookstr)
local retval = ''
for _, hook in ipairs(hooklist) do
retval = retval .. '{{Extension/HookInUse|' .. hook .. '}}'
end
return retval
end
}
-- </nowiki>