Skip to content

InteractiveStrategies/wordpress-cs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interactive Strategies WordPress coding standards

This package defines customized Code Sniffer rules for WordPress projects. It is primarily based on WordPress , with some sniffs excluded and others downgraded to warnings. Some additional sniffs not provided have also been added.

Installing the ruleset

Use Composer to install the ruleset and its dependencies as a package:

composer require --dev interactivestrategies/wordpress-cs

Making the IS rules the default for your project

Add a phpcs.xml.dist file in your project with content like this(make sure to replace the path with the correct theme file name):

<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="IS WordPress Standards">
    <rule ref="ISWordPress"/>

    <file>web/app/themes/emperor</file>
    <exclude-pattern>*.twig</exclude-pattern>
    <exclude-pattern type="relative">^*/.*\.twig$</exclude-pattern>

</ruleset>

The tag(s) define what paths the rules should be applied to/within.

About

IS's custom PHPCS rules for WordPress

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages