Module:Hooks

From Guild of Archivists

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>