-
-
Notifications
You must be signed in to change notification settings - Fork 490
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: documentation for FileName sniff
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<documentation title="File Name Standards"> | ||
<standard> | ||
<![CDATA[ | ||
Ensures that file names meet the following standards: | ||
- Filenames should be all lowercase with hyphens separating words. | ||
- Class file names should be based on the class name with "class-" prepended. | ||
- Files in `wp-includes` containing template tags should end in `-template`. | ||
If `$is_theme` property is set to `true` certain theme specific exceptions are made for underscores. | ||
]]> | ||
</standard> | ||
<code_comparison> | ||
<code title="Valid: All lowercase with only hyphens as word separators and proper use of prefix/suffix."> | ||
<![CDATA[ | ||
echo taxonomy<em>-</em>my<em>-</em>term.inc | ||
echo <em>s</em>ome<em>f</em>ile.inc | ||
echo <em>class</em>-testsample.inc | ||
echo other<em>-</em>punctuation.inc | ||
echo general<em>-template</em>.php | ||
]]> | ||
</code> | ||
<code title="Invalid: Use of other punctuation, uppercase, or missing prefix/suffix."> | ||
<![CDATA[ | ||
echo taxonomy-my<em>_</em>term.inc. | ||
echo <em>S</em>ome<em>F</em>ile.inc | ||
echo <em>testsample</em>-unit-2.inc | ||
echo other<em>+</em>punctuation<em>#</em>.inc | ||
echo <em>general</em>.php | ||
]]> | ||
</code> | ||
</code_comparison> | ||
</documentation> |