<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ACheck_DYK_hook%2Fdoc</id>
	<title>Module:Check DYK hook/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ACheck_DYK_hook%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:Check_DYK_hook/doc&amp;action=history"/>
	<updated>2026-06-14T05:06:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.3</generator>
	<entry>
		<id>https://mywikibiz.com/index.php?title=Module:Check_DYK_hook/doc&amp;diff=471226&amp;oldid=prev</id>
		<title>Zoran: Pywikibot 6.4.0</title>
		<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:Check_DYK_hook/doc&amp;diff=471226&amp;oldid=prev"/>
		<updated>2021-07-15T20:56:21Z</updated>

		<summary type="html">&lt;p&gt;Pywikibot 6.4.0&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
This module checks the format of [[Wikipedia:Did you know]] hooks used in {{tl|DYK talk}} and {{tl|Article history}}.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
This module can be used from templates or from other Lua modules.&lt;br /&gt;
&lt;br /&gt;
=== From templates ===&lt;br /&gt;
&lt;br /&gt;
From templates, call the &amp;lt;code&amp;gt;isValidHook&amp;lt;/code&amp;gt; function, and use the {{para|hook}} parameter to specify the hook.&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;#123;{#invoke:Check DYK hook&amp;amp;#124;isValidHook&amp;amp;#124;hook=''hook''}&amp;amp;#125;&lt;br /&gt;
&lt;br /&gt;
Valid hooks will return a value of &amp;quot;yes&amp;quot;; invalid hooks will return the empty string.&lt;br /&gt;
&lt;br /&gt;
You can also use the first positional parameter to specify the hook. If you do this, it is recommended to use {{para|1}} explicitly; if not, and the hook contains an equals sign, the text before the equals sign will be treated as a parameter name and the hook will not be recognised.&lt;br /&gt;
&lt;br /&gt;
=== From modules ===&lt;br /&gt;
&lt;br /&gt;
From modules, call the &amp;lt;code&amp;gt;_isValidHook&amp;lt;/code&amp;gt; function with the hook as the first positional parameter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mCheckDYKHook = require('Module:Check DYK hook')&lt;br /&gt;
result = mCheckDYKHook._isValidHook(hook)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid hooks will return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;; invalid hooks will return &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox | |&lt;br /&gt;
&amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zoran</name></author>
	</entry>
</feed>