forked from mirror/_s
Merge pull request #1115 from jrfnl/feature/check-correct-text-domain
Verify the text domain provided for all translatable strings for WPCS
This commit is contained in:
commit
23f963f322
|
@ -2,6 +2,7 @@
|
||||||
<ruleset name="WordPress Theme Coding Standards">
|
<ruleset name="WordPress Theme Coding Standards">
|
||||||
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
|
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
|
||||||
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
|
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
|
||||||
|
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
|
||||||
|
|
||||||
<!-- Set a description for this ruleset. -->
|
<!-- Set a description for this ruleset. -->
|
||||||
<description>A custom set of code standard rules to check for WordPress themes.</description>
|
<description>A custom set of code standard rules to check for WordPress themes.</description>
|
||||||
|
@ -13,6 +14,14 @@
|
||||||
<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />
|
<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
|
<!-- Verify that the text_domain is set to the desired text-domain.
|
||||||
|
Multiple valid text domains can be provided as a comma-delimited list. -->
|
||||||
|
<rule ref="WordPress.WP.I18n">
|
||||||
|
<properties>
|
||||||
|
<property name="text_domain" type="array" value="_s" />
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
|
||||||
<!-- Include sniffs for PHP cross-version compatibility. -->
|
<!-- Include sniffs for PHP cross-version compatibility. -->
|
||||||
<config name="testVersion" value="5.2-99.0"/>
|
<config name="testVersion" value="5.2-99.0"/>
|
||||||
<rule ref="PHPCompatibility"/>
|
<rule ref="PHPCompatibility"/>
|
||||||
|
|
Reference in New Issue