Skip to content

Commit 07abb48

Browse files
authored
Merge pull request #1827 from NielsdeBlaauw/1722-WordPress.WP.CapitalPDangit
Adds documentation for the WordPress.WP.CapitalPDangit sniff.
2 parents 600befa + 45f673d commit 07abb48

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<documentation title="Capital P Dangit">
2+
<standard>
3+
<![CDATA[
4+
The correct spelling of "WordPress" should be used in text strings, comments and object names.
5+
6+
In select cases, when part of an identifier or a URL, WordPress does not have to be capitalized.
7+
]]>
8+
</standard>
9+
<code_comparison>
10+
<code title="Valid: WordPress is correctly capitalized.">
11+
<![CDATA[
12+
class <em>WordPress</em>_Example {
13+
14+
/**
15+
* This function is about <em>WordPress</em>.
16+
*/
17+
public function explain() {
18+
echo 'This is an explanation
19+
about <em>WordPress</em>.';
20+
}
21+
}
22+
]]>
23+
</code>
24+
<code title="Invalid: WordPress is not correctly capitalized.">
25+
<![CDATA[
26+
class <em>Wordpress_Example</em> {
27+
28+
/**
29+
* This function is about <em>Wordpress</em>.
30+
*/
31+
public function explain() {
32+
echo 'This is an explanation
33+
about <em>wordpress</em>.';
34+
}
35+
}
36+
]]>
37+
</code>
38+
</code_comparison>
39+
</documentation>

0 commit comments

Comments
 (0)