Skip to content

Commit d180bd8

Browse files
author
Antti Kuosmanen
committed
Add CONTRIBUTING.md
1 parent dff673f commit d180bd8

2 files changed

Lines changed: 28 additions & 28 deletions

File tree

CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Contributing
2+
3+
Please make sure your code conforms to the code style used in the rest of the plugin.
4+
5+
We use the standard WordPress code style, with a few major exceptions to make it nicer for modern GitHub projects:
6+
7+
* Indedation is 2 spaces, not tabs.
8+
* Yoda conditions aren't enforced
9+
10+
## PHP Codesniffer
11+
12+
This project comes with a phpcs configuration (`phpcs.xml`) you can use to check your code like so:
13+
14+
Run phpcs in the project root directory:
15+
16+
```
17+
phpcs --extensions=php --standard=./phpcs.xml -n -p .
18+
```
19+
20+
Before you can run phpcs, you need to install PHP Codesniffer and WordPress coding standards like so:
21+
22+
```
23+
composer create-project wp-coding-standards/wpcs:dev-master --no-dev $HOME/wpcs
24+
```
25+
26+
Or read the official installation instructions here:
27+
28+
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards

readme.md renamed to README.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -196,31 +196,3 @@ The attribute will render as is on the `<form>` element
196196
<form class="libre-form libre-form-1" data-custom-attr="contactme">
197197
```
198198

199-
## Contributing
200-
201-
Please make sure your code conforms to the code style used in the rest of the plugin.
202-
203-
We use the standard WordPress code style, with a few major exceptions to make it nicer for modern GitHub projects:
204-
205-
* Indedation is 2 spaces, not tabs.
206-
* Yoda conditions aren't enforced
207-
208-
### PHP Codesniffer
209-
210-
This project comes with a phpcs configuration (`phpcs.xml`) you can use to check your code like so:
211-
212-
Run phpcs in the project root directory:
213-
214-
```
215-
phpcs --extensions=php --standard=./phpcs.xml -n -p .
216-
```
217-
218-
Before you can run phpcs, you need to install PHP Codesniffer and WordPress coding standards like so:
219-
220-
```
221-
composer create-project wp-coding-standards/wpcs:dev-master --no-dev $HOME/wpcs
222-
```
223-
224-
Or read the official installation instructions here:
225-
226-
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards

0 commit comments

Comments
 (0)