-
-
Notifications
You must be signed in to change notification settings - Fork 522
[Update] Documentation for sniff WordPress.Files.FilesName #2590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jasonkenison
wants to merge
10
commits into
WordPress:develop
Choose a base branch
from
jasonkenison:docs/WordPress/Files/FileNameStandard
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6d1f6bb
Add: documentation for FileName sniff
Nic-Sevic 4f4f541
fix: syntax issues
Nic-Sevic a08e092
initial edits, breaking up standards
jasonkenison 68a2773
updated examples, added new mimetype examples
jasonkenison 200cdfa
clarified code examples and standard text
jasonkenison 768e4a9
updated for spelling in broken "some" word
jasonkenison 82cd070
requested updates
jasonkenison 76d5c00
removed prefix from invalid line
jasonkenison 6620ea9
improve examples
jasonkenison 5458327
mixed case invalid example
jasonkenison File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,63 @@ | ||
| <?xml version="1.0"?> | ||
| <documentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd" | ||
| title="File Name" | ||
| > | ||
| <standard> | ||
| <![CDATA[ | ||
| Filenames should be all lowercase with hyphens separating words. | ||
| ]]> | ||
| </standard> | ||
| <code_comparison> | ||
| <code title="Valid: Lowercase and `-` separators."> | ||
| <![CDATA[ | ||
| taxonomy<em>-</em>my<em>-</em>term.inc | ||
| <em>some</em>-<em>file</em>.inc | ||
| other<em>-</em>punctuation.inc | ||
| ]]> | ||
| </code> | ||
| <code title="Invalid: Other punctuation or mixed case."> | ||
| <![CDATA[ | ||
| taxonomy-my<em>_</em>term.inc | ||
| <em>Some</em>-<em>File</em>.inc | ||
| other<em>+</em>punctuation<em>#</em>.inc | ||
| ]]> | ||
| </code> | ||
| </code_comparison> | ||
| <standard> | ||
| <![CDATA[ | ||
| Class file names should be based on the class name with `class-` prepended. | ||
| ]]> | ||
| </standard> | ||
| <code_comparison> | ||
| <code title="Valid: File name matches prefix and class."> | ||
| <![CDATA[ | ||
| <em>class-bulk-updater</em>.php // For a class named `Bulk_Updater`. | ||
| ]]> | ||
| </code> | ||
| <code title="Invalid: File name missing prefix or class."> | ||
| <![CDATA[ | ||
| class<em>.</em>bulk-updater.php | ||
| <em>bulk-updater</em>.php | ||
| bulk-updater<em>-class</em>.php | ||
| ]]> | ||
| </code> | ||
| </code_comparison> | ||
| <standard> | ||
| <![CDATA[ | ||
| Non-class files in the directory `wp-includes` with a "@subpackage Template" tag should use the `-template` suffix. | ||
| ]]> | ||
| </standard> | ||
| <code_comparison> | ||
| <code title="Valid: File name with proper suffix."> | ||
| <![CDATA[ | ||
| general<em>-template</em>.php | ||
| ]]> | ||
| </code> | ||
| <code title="Invalid: File name missing suffix."> | ||
| <![CDATA[ | ||
| <em>general</em>.php | ||
| ]]> | ||
| </code> | ||
| </code_comparison> | ||
| </documentation> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.