File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
WordPress/Docs/NamingConventions Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -24,16 +24,28 @@ function <em>Prefix_Function_NAME()</em> {}
2424 <code title =" Valid: Words separated by underscores." >
2525 <![CDATA[
2626class My_Class {
27- public static <em>method_name()</em> {}
27+ public static function <em>method_name()</em> {}
2828}
2929 ]]>
3030 </code >
3131 <code title =" Invalid: Using camel case to separate words." >
3232 <![CDATA[
3333class My_Class {
34- public static <em>methodName()</em> {}
34+ public static function <em>methodName()</em> {}
3535}
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 >
You can’t perform that action at this time.
0 commit comments