Unverified Commit 3c32cd78 authored by Felix Arntz's avatar Felix Arntz
Browse files

Add contributing info.

parent fcc7d02c
......@@ -8,5 +8,6 @@ composer.json export-ignore
deploy.sh export-ignore
phpcs.xml.dist export-ignore
phpunit.xml.dist export-ignore
CONTRIBUTING.md export-ignore
LICENSE.md export-ignore
README.md export-ignore
# Contributing
Contributions to WP Multi Network are much appreciated. You can help out in several ways:
* [File an issue.](https://github.com/stuttter/wp-multi-network/issues/new)
* [Open a pull-request.](https://github.com/stuttter/wp-multi-network/compare)
* [Translate the plugin.](https://translate.wordpress.org/projects/wp-plugins/wp-multi-network)
## Requirements & Recommendations
When contributing code to WP Multi Network, please keep the folowing in mind:
* Write code that is backward-compatible to PHP 5.2 and WordPress 4.6.
* Follow the [WordPress coding and documentation standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/).
* If possible, provide integration tests for your changes.
WP Multi Network provides easy-to-use workflows for both running integration tests (using PHPUnit) and checking coding and documentation standards (using PHPCodeSniffer). The plugin is integrated with Travis-CI in order to ensure those always pass.
### PHPUnit and PHPCS Workflows
It is recommended to run integration tests and PHPCodeSniffer locally before committing, to check in advance that your changes do not cause unexpected issues. Here is how you can do that:
* After cloning the plugin, you need to set up its dependencies by running `composer install`, and then `composer config-phpcs` to set up the WordPress Coding Standards. You only need to do this once.
* In order to run the integration tests, you need to run `vendor/bin/phpunit`.
* In order to check against the WordPress Coding Standards, you need to run `vendor/bin/phpcs`.
### Writing Integration Tests
Integration tests should go into the `tests/integration/tests` directory. Each test class should extend the `WPMN_UnitTestCase` class, and file names should be prefixed with `test-`.
......@@ -91,4 +91,4 @@ To achieve nested folder paths in this fashion `network1/site1`, `network1/site2
### Can I contribute?
Please! The number of users needing multiple WordPress networks is growing fast. Having an easy-to-use interface and powerful set of functions is critical to managing complex WordPress installations. If this is your thing, please help us out!
Please! The number of users needing multiple WordPress networks is growing fast. Having an easy-to-use interface and powerful set of functions is critical to managing complex WordPress installations. If this is your thing, please help us out! Read more in the [plugin contributing guidelines](https://github.com/stuttter/wp-multi-network/blob/master/CONTRIBUTING.md).
......@@ -85,6 +85,7 @@ fi
cd $SVNPATH/trunk/
printf "Removing unnecessary GitHub and test files..."
rm CONTRIBUTING.md
rm LICENSE.md
rm README.md
rm -rf tests
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment