Getting started

We are using docker as the main tool to setup planet4 in a local development environment.

So first thing is to setup planet4 locally. To do that, read our detailed documentation on our planet4-docker-compse repository.

Development

Planet 4 consists of many repositories, for all the themes and plugins we develop:

Once you have planet4 running locally, you will find the code under persistence/app/public/wp-content/themes/ and persistence/app/public/wp-content/plugins/ for themes and plugins respectively.

To start working on these repositories run make dev first.

Now pick the one you want to work on, fork it on Github and add it to your local setup. Let’s see an example based on planet4-master-theme.
(Replace all “username” occurrences with your Github username.)

  1. Fork planet4-master-theme through Github. This will create https://github.com/<username>/planet4-master-theme/
  2. Go to the relevant local path:
    cd persistence/app/public/wp-content/themes/planet4-master-theme
  3. Add your fork as a new remote:
    git remote add username git@github.com:username/planet4-master-theme.git
  4. Create a feature branch to work on:
    git checkout -b feature/foo-bar
  5. Commit your changes:
    git commit -am "Add some foo-bar"
  6. Push to the branch to your fork:
    git push username feature/foo-bar
  7. Create a new Pull Request

Pull Requests

Before working on something or opening a Pull Request, please make sure that there is a relevant issue:

The tickets labeled as Contribution are a good starting point for start coding.

All Pull Requests should target the develop branch. Make sure to reference the relevant issue in your Pull Request description.

Coding

In general we try to stick as close as possible to WordPress Coding Standards. The best approach to make sure your code is following planet4’s coding style is to use code linters. Most code editors have integrations and plugins for linting the code in realtime. Here is a list of the linters we use:

Code Of Conduct

In the interest of fostering an open, inclusive and welcoming environment, our project is following a Contributor Code of Conduct.

Resources

If you want to read more about planet4, here is a list of resource you can dive in: