Jump to content

Module:MediaWiki:Talkpageheader

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Awesome Aasim (talk | contribs) at 18:35, 25 March 2023. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}
local isIP = require('Module:IPAddress')._isIp
p.main = function(frame)
	local args = require('Module:Arguments').getArgs(frame)
	local tptext = ''
	local pageTitle = args[1] and mw.title.new(args[1]) or mw.title.getCurrentTitle()
	local out = ''
	local text = frame:preprocess('{{:' .. pageTitle.fullText .. '}}')
	if not mw.ustring.find(text, 'id="talkheader"') then
		out = out .. '{{Talk header}}\n'
	end
	return frame:preprocess(out)
end
return p