<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/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://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ACheck_DYK_hook%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Check_DYK_hook/doc&amp;action=history"/>
	<updated>2026-04-16T20:05:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Check_DYK_hook/doc&amp;diff=135539&amp;oldid=prev</id>
		<title>imported&gt;Headbomb: This module checks the format of Wikipedia:Did you know hooks used in {{tl|DYK talk}} and {{tl|Article history}}.</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Check_DYK_hook/doc&amp;diff=135539&amp;oldid=prev"/>
		<updated>2020-11-29T15:39:01Z</updated>

		<summary type="html">&lt;p&gt;This module checks the format of &lt;a href=&quot;https://en.wikipedia.org/wiki/Did_you_know&quot; class=&quot;extiw&quot; title=&quot;wikipedia:Did you know&quot;&gt;Wikipedia:Did you know&lt;/a&gt; hooks used in {{tl|DYK talk}} and {{tl|Article history}}.&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=&amp;#039;&amp;#039;hook&amp;#039;&amp;#039;}&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(&amp;#039;Module:Check DYK hook&amp;#039;)&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>imported&gt;Headbomb</name></author>
	</entry>
</feed>