Skip to content

Instantly share code, notes, and snippets.

@tarecord
Created March 9, 2024 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarecord/747dfaf00a6cb3900c05347a108608cc to your computer and use it in GitHub Desktop.
Save tarecord/747dfaf00a6cb3900c05347a108608cc to your computer and use it in GitHub Desktop.
A starter configuration file for WordPress Coding Standards
<?xml version="1.0"?>
<ruleset name="Your Project Name">
<description>A custom set of rules to check for a WordPress project</description>
<!-- Check all files in the root directory -->
<file>.</file>
<!-- Enable specific WordPress standards -->
<rule ref="WordPress-Extra"/>
<rule ref="WordPress-Docs"/>
<!--
To get the optimal benefits of using WordPressCS, we should add a couple of
custom properties.
Adjust the values of these properties to fit our needs.
For information on additional custom properties available, check out
the wiki:
https://github.com/WordPress/WordPress-Coding-Standards/wiki/Customizable-sniff-properties
-->
<config name="minimum_wp_version" value="6.4"/>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="my-textdomain"/>
<element value="library-textdomain"/>
</property>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="my_prefix"/>
</property>
</properties>
</rule>
</ruleset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment