- Clone this repository to your local machine
- cd into the cloned repository and navigate to the
wordpressdirectory - Install the WordPress Coding Standards using Composer:
composer install - Copy phpcs.xml.dist to the root of your project, change
text_domain,prefixesto match your project - Settings -> PHP -> Quality Tools -> PHP_CodeSniffer -> Set to ON
- Configuration -> click "..."
- Set "PHP_CodeSniffer path":
- On MacOs:
vendor/bin/phpcs - On Windows:
vendor/bin/phpcs.bat
- On MacOs:
- Set "PHP Code Beatifier and Fixer Settings" -> "Path to phpcbf":
- On MacOs:
vendor/bin/phpcbf - On Windows:
vendor/bin/phpcbf.bat
- On MacOs:
- Set Coding Standard to "Custom" and point it to the location of the copied
phpcs.xml.distfile - Editor -> Inspections -> PHP -> PHP_CodeSniffer validation -> Set to ON





