emmarise / planet4-master-theme

Wordpress master theme for the Greenpeace Planet 4 project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Greenpeace Planet4 Master Theme

Planet4

Introduction

What is it?

This is the master Wordpress theme for Greenpeace Planet4 project. You can learn more about this project on the planet4 blog.

This theme is based on the timber/starter-theme codebase. It has a correlated child theme.

How to use this theme in planet4

You can use the theme in Wordpress directly, by including it at your composer.json file:

"require": {
    ...
    "greenpeace/planet4-master-theme" : "X.X.X",
    "greenpeace/planet4-child-theme" : "X.X.X",
    ...
},

By default the child theme is used but you can activate the master theme by specifying it in wp-cli.yml like:

theme activate:
  - planet4-master-theme

You can then run composer run-script theme:activate to activate it.

Task automation

We use gulp as automation tools for local development.

Available tasks

  • gulp sass 'concatanates/compiles sass files into a minified single stylesheet'
  • gulp uglify 'concatanates/mangles js files into a minified single js file'
  • gulp watch 'watches for changes in js or sccs and runs the minification tasks'
  • gulp git_hooks 'copies repo's git hooks to local git repo'

Code standards

We follow the WordPress Coding Standards

We use a custom php codesniffer ruleset which adds some rules over WordPress-Core, WordPress-Docs and WordPress-Extra rulesets.

WordPress Coding Standards Rulesets

WordPress Coding Standards Wiki

To run the php codesniffer

$ vendor/bin/phpcs or $ composer sniffs

To run the php code beautifier and fixer

$ vendor/bin/phpcbf or $ composer fixes

Contribute

Please read the Contribution Guidelines for Planet4.

Automated testing

Automated tests done using BrowserStack.

BrowserStack Logo

About

Wordpress master theme for the Greenpeace Planet 4 project

License:GNU General Public License v3.0


Languages

Language:PHP 67.5%Language:Twig 13.6%Language:JavaScript 9.5%Language:SCSS 7.1%Language:Shell 1.3%Language:CSS 0.8%Language:HTML 0.1%