Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wpsh/wpcs-for-envato

Unofficial PHP coding standards for WordPress theme and plugins sold on ThemeForest and CodeCanyon
https://github.com/wpsh/wpcs-for-envato

envato envato-market phpcs phpcs-standard wordpress wordpress-development

Last synced: 24 days ago
JSON representation

Unofficial PHP coding standards for WordPress theme and plugins sold on ThemeForest and CodeCanyon

Awesome Lists containing this project

README

        

# Coding Standard for WordPress Plugins and Themes on Envato Market

[![Build Status](https://travis-ci.com/wpsh/wpcs-for-envato.svg?branch=master)](https://travis-ci.com/wpsh/wpcs-for-envato)

Automatically check for Envato [WordPress plugin](https://help.author.envato.com/hc/en-us/articles/360000481223-WordPress-Theme-Plugin-Requirements) and [theme coding requirements](https://help.author.envato.com/hc/en-us/articles/360000479946-WordPress-Theme-Coding-Requirements). Based on the official [WordPress coding standards](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards) but more relaxed.

## Requirements

- [Composer](https://getcomposer.org)

## Setup

1. Add these coding standards as a [Composer development dependency](https://packagist.org/packages/wpsh/wpcs-for-envato) to your project:

```bash
composer require --dev wpsh/wpcs-for-envato
```

2. Define a script in `composer.json` to run the checks:

```json
{
"scripts": {
"phpcs": "./vendor/bin/phpcs --standard=WPCSForEnvato --extensions=php",
"phpcs-fix": "./vendor/bin/phpcbf --standard=WPCSForEnvato --extensions=php"
}
}
```

Use `composer phpcs` to run the coding standard checks and `composer phpcs-fix` to automatically fix some of the coding standard violations.

## Configuration

Add `phpcs.xml.dist` to your project root that provides additional configuration options:

```xml









```

## Credits

Created by [Kaspars Dambis](https://kaspars.net).