Skip to content

Commit 9c8606e

Browse files
committed
NamingConventions/ValidFunctionName: add code example for double underscore prefix
This is one of the errors that the sniff generates, it was mentioned in the XML documentation description, but there was no <code_comparison> block for it.
1 parent a5d8c67 commit 9c8606e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

WordPress/Docs/NamingConventions/ValidFunctionNameStandard.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,16 @@ class My_Class {
3636
]]>
3737
</code>
3838
</code_comparison>
39+
<code_comparison>
40+
<code title="Valid: Single underscore prefix is allowed.">
41+
<![CDATA[
42+
function <em>_prefix_function_name()</em> {}
43+
]]>
44+
</code>
45+
<code title="Invalid: Double underscore prefix is not allowed.">
46+
<![CDATA[
47+
function <em>__prefix_function_name()</em> {}
48+
]]>
49+
</code>
50+
</code_comparison>
3951
</documentation>

0 commit comments

Comments
 (0)