When contributing to this repository, please first discuss the change you wish to make via issue.
Please use provided templates for issues and pull requests. If you don't give the details these templates ask for it will be harder to address your issue and/or review your code.
This repository adheres (or at least tries 😉) to WordPress Coding Standards for PHP and JavaScript. The exceptions are:
- Indentation with spaces, not tabs
- PHP indentation: 2 spaces
The code you submit should follow these rules.
For PHP files rules are enforced by PHP Code Sniffer with the WordPress
standard.
Refer to the official repository for more information.
README.md contains information on how to use PHP Code Sniffer in this project.
This is very helpful in fixing style issues. You can also use the phpcbf
command to
resolve some style issues automatically.
Currently there are no automated style checks for JS files so please double-check your code. Eslint is set up but it only performs basic syntax checks.
If you have any style related questions you can include them in your PR's description or in a related issue.
- Discuss your changes in an issue first.
- Make sure the
npm run build
command runs without errors. - Make sure the
phpcs --tab-width=2
command runs without errors or warnings. Remember this should be executed on the Vagrant machine. - Open a new pull request by filling out the template.