Skip to content

Commit

Permalink
fix: syntax issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Nic-Sevic committed Sep 17, 2024
1 parent 6d1f6bb commit 4f4f541
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions WordPress/Docs/Files/FileNameStandard.xml
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
<documentation title="File Name Standards">
<standard>
<?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 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`.
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.
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
taxonomy<em>-</em>my<em>-</em>term.inc
<em>s</em>ome<em>f</em>ile.inc
<em>class</em>-testsample.inc
other<em>-</em>punctuation.inc
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
taxonomy-my<em>_</em>term.inc.
<em>S</em>ome<em>F</em>ile.inc
<em>testsample</em>-unit-2.inc
other<em>+</em>punctuation<em>#</em>.inc
<em>general</em>.php
]]>
</code>
</code_comparison>
Expand Down

0 comments on commit 4f4f541

Please sign in to comment.